From f00edf85c4e447ca602f305d2a4fa395e62f1360 Mon Sep 17 00:00:00 2001 From: PA4WDH Date: Sun, 21 May 2023 10:36:23 +0200 Subject: Remove buildtime from version.h, add branch --- cputemp2maxfreq.c | 2 +- generate_version_h.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cputemp2maxfreq.c b/cputemp2maxfreq.c index 4374ea4..ee983ca 100644 --- a/cputemp2maxfreq.c +++ b/cputemp2maxfreq.c @@ -18,7 +18,7 @@ int main() long int diff; long int newfreq; - printf("Version %s, buildtime %s\n",VERSION_FULL,BUILDTIME); + printf("Version %s, buildtime %s %s\n",VERSION_FULL,__DATE__,__TIME__); // Print configuration printf("Configuration:\n"); diff --git a/generate_version_h.sh b/generate_version_h.sh index 1e90ced..fed5fa0 100755 --- a/generate_version_h.sh +++ b/generate_version_h.sh @@ -2,9 +2,9 @@ VERSION=`git describe --abbrev=0` HASH=`git show --format="%h" --no-patch master` - +BRANCH=`git rev-parse --abbrev-ref HEAD` echo "#define VERSION \"$VERSION\"" echo "#define HASH \"$HASH\"" -echo "#define VERSION_FULL VERSION\"-\"HASH" -echo "#define BUILDTIME \"`date -Isec`\"" +echo "#define BRANCH \"$BRANCH\"" +echo "#define VERSION_FULL VERSION\"-\"HASH\" (\"BRANCH\")\"" -- cgit v1.2.3