aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin/update-version
diff options
context:
space:
mode:
Diffstat (limited to 'bin/update-version')
-rwxr-xr-xbin/update-version9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/update-version b/bin/update-version
new file mode 100755
index 0000000..b9b3d21
--- /dev/null
+++ b/bin/update-version
@@ -0,0 +1,9 @@
+#!/bin/bash
+cd "$(dirname "$0")" || exit 1
+[ -L "$(basename "$0")" ] && cd "$(dirname "$(readlink "$(basename "$0")")")"
+if ! git describe --tags 2>/dev/null > ../VERSION; then
+ printf 'git ' > ../VERSION
+ git rev-parse --short HEAD >> ../VERSION
+fi
+printf 'stored version: '
+cat ../VERSION \ No newline at end of file