diff --git a/.travis.yml b/.travis.yml index 7cd7a47..58b8bf8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ os: linux dist: bionic -# Python is required to run `doc_status.py` +# Python is required to run `doc_status.py`. language: python python: diff --git a/build.sh b/build.sh index 48ff135..d5f66ca 100755 --- a/build.sh +++ b/build.sh @@ -8,11 +8,17 @@ git clone --depth=1 https://github.com/godotengine/godot.git "$TMP" # Generate a Markdown table of the class reference coverage. mkdir -p content/ -rm -f content/index.md +rm -f content/_index.md # Add Git commit information to the generated page. +# Must end with a blank line so the table that will be appended can be parsed correctly. COMMIT_HASH="$(git -C "$TMP" rev-parse --short=9 HEAD)" -echo -e "Generated from commit [$COMMIT_HASH](https://github.com/godotengine/godot/commit/$COMMIT_HASH).\n" > content/_index.md +cat << EOF > content/_index.md +# Godot class reference status + +Generated from Godot commit [$COMMIT_HASH](https://github.com/godotengine/godot/commit/$COMMIT_HASH). + +EOF # Trim the first line of the output to get a valid Markdown table. python3 "$TMP/doc/tools/doc_status.py" -u "$TMP/doc/classes" | tail -n +2 >> content/_index.md