From 6fd6488d63e231ece9af5c69deebae6a77bcb2c8 Mon Sep 17 00:00:00 2001 From: Michael Black W9MDB Date: Thu, 4 Jun 2020 12:18:41 -0500 Subject: [PATCH] Add SHA to version info --- tests/Makefile.am | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 7cbcc7be8..270eca38d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -100,8 +100,10 @@ testloc.sh: # If we have a .git directory then we will generate the hamlibdate.h file. # if not, then copy the placeholder. hamlibdatetime.h: FORCE + echo "SHA=$(SHA)" test ! -x $(top_srcdir)/.git || echo "/* This date time is from the last non-merge commit to Hamlib. */" > $(srcdir)/hamlibdatetime.h - test ! -x $(top_srcdir)/.git || echo "#define HAMLIBDATETIME "\"$$(TZ=UTC git --git-dir=$(top_srcdir)/.git log --no-merges --date='format-local:%a %b %d %H:%M:%S %Y %z' --format='%cd' -n 1)\""" >> $(srcdir)/hamlibdatetime.h + test ! -x $(top_srcdir)/.git || echo -n "#define HAMLIBDATETIME "\"$$(TZ=UTC git --git-dir=$(top_srcdir)/.git log --no-merges --date='format-local:%a %b %d %H:%M:%S %Y %z SHA=' --format='%cd' -n 1)"" >> $(srcdir)/hamlibdatetime.h + test ! -x $(top_srcdir)/.git || echo $$(git --git-dir=$(top_srcdir)/.git log --no-merges | grep commit | head -n 1 | cut -c8-13)\" >> $(srcdir)/hamlibdatetime.h test -f $(srcdir)/hamlibdatetime.h || cp $(srcdir)/hamlibdatetime.h.in $(srcdir)/hamlibdatetime.h FORCE: ;