diff --git a/src/build/gitinfo.bat b/src/build/gitinfo.bat index 63b9bec24281ecdfdae45c7e7155cf4a95a10f91..588e08d6e00c0ac09b92b5d977c342cfdd23f697 100644 --- a/src/build/gitinfo.bat +++ b/src/build/gitinfo.bat @@ -1,4 +1,5 @@ @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 @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 \ No newline at end of file +@echo ^" >> git_branch.h diff --git a/src/sbbs3/targets.mk b/src/sbbs3/targets.mk index 6049d0e3a4cf04c3ace8433e3c08a8f8c2bbe717..f55d2f5e81c1d7ff53afe0d5b43f69bd5425f842 100644 --- a/src/sbbs3/targets.mk +++ b/src/sbbs3/targets.mk @@ -158,6 +158,7 @@ FORCE: ifneq ($(GIT), NO) git_hash.h: FORCE ../../.git $(QUIET)echo '#define GIT_HASH "'`git log -1 HEAD --format=%h`\" > $@.tmp + $(QUIET)echo '#define GIT_DATE "'`git log -1 HEAD --format=%cd '--date=format-local:%b %e %Y %H:%M'`\" >> $@.tmp $(QUIET)test -e $@ && diff $@.tmp $@ || cp $@.tmp $@ $(QUIET)rm -f $@.tmp diff --git a/src/sbbs3/ver.cpp b/src/sbbs3/ver.cpp index 789d4f2c6399fcfec93d71a5699b9bff3d0c8f93..b0ee0072af78e5117c8e0785db6cf4b6d7980500 100644 --- a/src/sbbs3/ver.cpp +++ b/src/sbbs3/ver.cpp @@ -32,6 +32,7 @@ extern "C" { #endif const char* git_hash = GIT_HASH; +const char* git_date = GIT_DATE; const char* git_branch = GIT_BRANCH; const char* beta_version = " "; /* Space if non-beta, " beta" otherwise */ @@ -94,7 +95,7 @@ void sbbs_t::ver() center(str); CRLF; - center("https://gitlab.synchro.net - " GIT_BRANCH "/" GIT_HASH); + center(GIT_BRANCH "/" GIT_HASH " - " GIT_DATE); CRLF; sprintf(str,"%s - http://synchro.net", COPYRIGHT_NOTICE); diff --git a/src/sbbs3/ver.h b/src/sbbs3/ver.h index 288605929394d995049c524bd3b57766f985e89b..3d82ec628e7f18ed97ae41d96a1e11f226b07d6c 100644 --- a/src/sbbs3/ver.h +++ b/src/sbbs3/ver.h @@ -27,10 +27,11 @@ extern "C" { #endif extern const char* git_hash; +extern const char* git_date; extern const char* git_branch; extern const char* beta_version; #ifdef __cplusplus } #endif -#endif /* Don't add anything after this line */ \ No newline at end of file +#endif /* Don't add anything after this line */