aboutsummaryrefslogtreecommitdiffstats
path: root/generate_version_h.sh
diff options
context:
space:
mode:
authorPA4WDH2023-05-20 22:49:21 +0200
committerPA4WDH2023-05-20 22:49:21 +0200
commit4ea89d03fc35f1a5e38427e2ee94951bf8bc1504 (patch)
treece88a11f552fad765080703d768375589a949b9a /generate_version_h.sh
parentAdd validation and fallback to startup (diff)
downloadcputemp2maxfreq-4ea89d03fc35f1a5e38427e2ee94951bf8bc1504.tar.gz
cputemp2maxfreq-4ea89d03fc35f1a5e38427e2ee94951bf8bc1504.tar.bz2
cputemp2maxfreq-4ea89d03fc35f1a5e38427e2ee94951bf8bc1504.zip
Add automatic versioning
Diffstat (limited to 'generate_version_h.sh')
-rwxr-xr-xgenerate_version_h.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/generate_version_h.sh b/generate_version_h.sh
new file mode 100755
index 0000000..1e90ced
--- /dev/null
+++ b/generate_version_h.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+VERSION=`git describe --abbrev=0`
+HASH=`git show --format="%h" --no-patch master`
+
+
+echo "#define VERSION \"$VERSION\""
+echo "#define HASH \"$HASH\""
+echo "#define VERSION_FULL VERSION\"-\"HASH"
+echo "#define BUILDTIME \"`date -Isec`\""