diff options
Diffstat (limited to 'util/getversion.sh')
-rwxr-xr-x | util/getversion.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/getversion.sh b/util/getversion.sh index c1da044690..798bb51448 100755 --- a/util/getversion.sh +++ b/util/getversion.sh @@ -31,6 +31,8 @@ fi ver="${BOARD}_${vbase}" +gitdate=$(git log -1 --format='%ai' HEAD | cut -d ' ' -f '1 2') + echo "/* This file is generated by util/getversion.sh */" echo "/* Version string for use by common/version.c */" @@ -47,3 +49,8 @@ echo "/* Sub-fields for use in Makefile.rules and to form build info string" echo " * in common/version.c. */" echo "#define VERSION \"${ver}\"" echo "#define BUILDER \"${USER}@`hostname`\"" + +echo "/* Author date of last commit, in case compile-time is not used. */" +echo "#ifndef DATE" +echo "#define DATE \"${gitdate}\"" +echo "#endif" |