Add commit date information to the header

This makes it easier to notice the page is up-to-date (or not),
without having to click on the commit hash.
This commit is contained in:
Hugo Locurcio 2020-06-15 21:40:20 +02:00
parent 83d09f8af9
commit a88e9d3198
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
1 changed files with 5 additions and 2 deletions

View File

@ -11,12 +11,15 @@ mkdir -p content/
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)"
COMMIT_DATE="$(git log -1 --pretty=%cd --date=format:%Y-%m-%d)"
# This template must end with a blank line so the table that will be appended
# can be parsed correctly.
cat << EOF > content/_index.md
# Godot class reference status
Generated from Godot commit [$COMMIT_HASH](https://github.com/godotengine/godot/commit/$COMMIT_HASH).
Generated from Godot commit [$COMMIT_HASH](https://github.com/godotengine/godot/commit/$COMMIT_HASH)
($COMMIT_DATE).
Interested in contributing? See
[Contribute to the class reference](https://docs.godotengine.org/en/latest/community/contributing/updating_the_class_reference.html)