diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-16 18:57:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-17 18:49:08 +0100 |
| commit | 83e958417124720d9658f1e0f92868e785bfaffe (patch) | |
| tree | 7475883ebda60173377ffba5da03b62829c82805 | |
| parent | b090dda8afed4f73349a5fa1e603a734171aa404 (diff) | |
Fix versioning of .dmg filenames.
Now we use a tag if there is one at the commit we built, otherwise
<branch>-<commit>.
| -rw-r--r-- | platform/osx/make_dmg.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh index 3df5c57a2..80205822a 100644 --- a/platform/osx/make_dmg.sh +++ b/platform/osx/make_dmg.sh @@ -7,7 +7,12 @@ SYNTAX="make_dmg.sh <environment> <builddir> <apple-id> <apple-password> <arch1> # 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 <branch>-<commit> + version="$(basename $(git name-rev --name-only HEAD))-$(git rev-parse --short HEAD)" +fi # DMG size in megabytes DMG_SIZE=256 |
