From a88e9d3198f6f45a4c410872086ae2ce2f84eb9c Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Mon, 15 Jun 2020 21:40:20 +0200 Subject: [PATCH] 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. --- build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 7a4a172..5ca8168 100755 --- a/build.sh +++ b/build.sh @@ -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)