From 30b0f5b86022753c828bd455306c5e50ca14c5b3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 16 Jan 2022 18:57:10 +0100 Subject: Fix versioning of .dmg filenames. Now we use a tag if there is one at the commit we built, otherwise -. --- platform/osx/make_dmg.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh index 3df5c57a2..ba0f060ed 100644 --- a/platform/osx/make_dmg.sh +++ b/platform/osx/make_dmg.sh @@ -7,7 +7,12 @@ SYNTAX="make_dmg.sh # Don't set -e here as egrep (used a few times) returns 1 if no matches # were found. -version=`git describe --tags --abbrev=0 | sed -e "s/v//"` +# Use a tag if what we've built is exactly on one +version=$(git describe --tags --abbrev=0 --match=v2.*.* --exact-match $1 2> /dev/null) +if [ "$?" != "0" ]; then + # Otherwise use - + version="$(git rev-parse --abbrev-ref HEAD)-$(git rev-parse --short HEAD)" +fi # DMG size in megabytes DMG_SIZE=256 -- cgit v1.2.3