Summary Files Commits Branches @commit @diff @stats
path: root / version.sh
diff options
context:
space:
mode:
Commitad8b3dd9b8d29d067d9b2f4babe7aaa70be58c3d (patch)
Author
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-01-21 02:12:30 +0100
Committer
 Haelwenn (lanodan) Monnier <contact@hacktivis.me>
2020-05-03 00:42:08 +0200
Filesd03a4f284e4f7776d2da87e8be19d1a87642238b /version.sh
goodwolf-ad8b3dd9b8d29d067d9b2f4babe7aaa70be58c3d.tar
goodwolf-ad8b3dd9b8d29d067d9b2f4babe7aaa70be58c3d.tar.gz
goodwolf-ad8b3dd9b8d29d067d9b2f4babe7aaa70be58c3d.zip
Parente64d606e233e320d8df20958ee9e964fd95dca6a (diff)
Download progress tab
1 files changed, 3 insertions, 2 deletions
-rwxr-xr-xversion.sh5
diff --git a/version.sh b/version.sh
index 318aa72..0c9d3d6 100755
--- a/version.sh
+++ b/version.sh
@@ -1,8 +1,9 @@
#!/bin/sh
hash=$(git --git-dir="$(dirname $0)/.git" rev-parse --short HEAD 2>/dev/null)
+branch=$(git --git-dir="$(dirname $0)/.git" rev-parse --abbrev-ref HEAD | sed -r 's/.*[^0-9A-Za-z-]([0-9A-Za-z-]*)$/\1/g')
-if [ -n "$hash" ]
+if [ -n "$hash" ] || [ -n "$branch" ]
then
- printf '+g%s' "$hash"
+ printf '+g%s.%s' "$hash" "$branch"
fi
echo