Skip to content

Commit

Permalink
ci: add consistent python3/python handling at build.sh (#3475)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Vuillamy <[email protected]>
  • Loading branch information
pjungermann and nvuillam authored Apr 18, 2024
1 parent c80e12a commit 578b801
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@ fi

# Prettify `search_index.json` after `mkdocs`
# `mkdocs` removed its own prettify few years ago: https://github.com/mkdocs/mkdocs/pull/1128
python -m json.tool ./site/search/search_index.json >./site/search/search_index_new.json
if type python3 >/dev/null 2>/dev/null; then
python3 -m json.tool ./site/search/search_index.json >./site/search/search_index_new.json
else
python -m json.tool ./site/search/search_index.json >./site/search/search_index_new.json
fi
mv -f -- ./site/search/search_index_new.json ./site/search/search_index.json

0 comments on commit 578b801

Please sign in to comment.