Skip to content

Commit a159383

Browse files
committed
fix up our script for extracting the git version
1 parent ca0b52b commit a159383

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bin/version

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
# Return the version string used to describe this version of Metabase.
44

5-
TAG=$(git describe origin/master --tags --abbrev=0)
5+
TAG=$(git name-rev --tags --name-only HEAD)
6+
TAG=${TAG%^0}
67
HASH=$(git show-ref --head --hash=7 head) # first 7 letters of hash should be enough; that's what GitHub uses
7-
BRANCH=$(git symbolic-ref --short HEAD)
8+
BRANCH=$(git rev-parse --abbrev-ref HEAD)
89
DATE=$(git log -1 --pretty=%ad --date=short)
910

1011
echo "$TAG $HASH $BRANCH $DATE"

0 commit comments

Comments
 (0)