aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-06-23 21:36:19 +0200
committerSébastien Dailly <sebastien@dailly.me>2026-06-23 21:36:19 +0200
commit4478fa105477ce6571bcf6f4271c0c1b4ff40e00 (patch)
treefee389c20f5989ac55b2c0a63724f110e086ec4c /lib
parent7a8d35a8a27f4492fbb021e583f30f9a96f10a25 (diff)
Updated the way to get the git commitmain
Diffstat (limited to 'lib')
-rwxr-xr-xlib/tools/git_head.sh7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/tools/git_head.sh b/lib/tools/git_head.sh
index bfa738a..2d27275 100755
--- a/lib/tools/git_head.sh
+++ b/lib/tools/git_head.sh
@@ -1,11 +1,6 @@
#! /bin/sh
# Include the git hash in an OCaml file.
-git diff-index --quiet HEAD --
-if [ $? -ne 0 ]; then
- revision=": untracked"
-else
- revision=$(git rev-parse --short HEAD)
-fi
+revision=$(git describe --tags --always --dirty)
compile_date=$(date +%Y/%m/%d)
echo "let revision = \"${revision} - compiled on ${compile_date}\""