aboutsummaryrefslogtreecommitdiff
path: root/tools/git_head.sh
diff options
context:
space:
mode:
authorChimrod <>2023-10-01 19:30:58 +0200
committerChimrod <>2023-10-01 19:30:58 +0200
commitb7964befd039c41c63e00ef323f9eb49061c144c (patch)
treeed2eb4eeaf60cbc2ed560931203fb1a2fcf682ef /tools/git_head.sh
parent622bbf897af29ec6f7d533f915b0170d3a9c899f (diff)
Added the git revision in the code
Diffstat (limited to 'tools/git_head.sh')
-rwxr-xr-xtools/git_head.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/git_head.sh b/tools/git_head.sh
new file mode 100755
index 0000000..42c6dcb
--- /dev/null
+++ b/tools/git_head.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+# Include the git hash in an OCaml file.
+
+revision=$(git rev-parse --short HEAD)
+compile_date=$(date +%Y/%m/%d)
+
+
+echo "let revision = \"${revision} - compiled on ${compile_date}\""
+