Skip to content
Snippets Groups Projects
Commit 708095ab authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Zero-pad (instead of space-pad) the day of month in GIT_DATE

This is not consistent with __DATE__ macro expansion, but I like it better

Heck, now that we're not really logging the build date much of anywhere, we
could go with any other more sensible date format here.
parent 4b3e16b4
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
@git log -1 HEAD --format="#define GIT_HASH \"%%h\"" > git_hash.h
@git log -1 HEAD --format="#define GIT_DATE \"%%cd\"" "--date=format-local:%%b %%e %%Y %%H:%%M" >> git_hash.h
@git log -1 HEAD --format="#define GIT_DATE \"%%cd\"" "--date=format-local:%%b %%d %%Y %%H:%%M" >> git_hash.h
@echo #define GIT_BRANCH ^"| tr -d "\r\n" > git_branch.h
@git rev-parse --abbrev-ref HEAD | tr -d "\n" >> git_branch.h
@echo ^" >> git_branch.h
......@@ -158,7 +158,7 @@ FORCE:
ifneq ($(GIT), NO)
git_hash.h: FORCE ../../.git
$(QUIET)git log -1 HEAD --format="#define GIT_HASH \"%h\"" > $@.tmp
$(QUIET)git log -1 HEAD --format="#define GIT_DATE \"%cd\"" '--date=format-local:%b %e %Y %H:%M' >> $@.tmp
$(QUIET)git log -1 HEAD --format="#define GIT_DATE \"%cd\"" '--date=format-local:%b %d %Y %H:%M' >> $@.tmp
$(QUIET)test -e $@ && diff $@.tmp $@ || cp $@.tmp $@
$(QUIET)rm -f $@.tmp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment