diff --git a/tools/mkversion.sh b/tools/mkversion.sh index ce4bc90cc..f4dd350d6 100755 --- a/tools/mkversion.sh +++ b/tools/mkversion.sh @@ -65,7 +65,15 @@ if [ "$commandGIT" != "" ]; then fi if [ "$gitbranch" != "" ] && [ "$gitversion" != "" ]; then fullgitinfo="${fullgitinfo}/${gitbranch}/${gitversion}" - ctime="$(date '+%Y-%m-%d %H:%M:%S')" + # if FORCED_DATE present and properly formatted: + case "$FORCED_DATE" in + [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" "[0-9][0-9]:[0-9][0-9]:[0-9][0-9]) + ctime="$FORCED_DATE" + ;; + *) + ctime="$(date '+%Y-%m-%d %H:%M:%S')" + ;; + esac else fullgitinfo="${fullgitinfo}/master/release (git)" fi