diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-18 22:06:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-18 22:06:56 +0100 |
| commit | 1eadc0136dab1d004e588260008a1273c130790a (patch) | |
| tree | 0bd18799f18638b6f3956126f3971c52c24ef77b | |
| parent | 19572e1ac1334a8f024b0b429d8622c0a198fb37 (diff) | |
Fix .dmg naming yet again; sed was breaking the $? check.
| -rw-r--r-- | platform/osx/make_dmg.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/osx/make_dmg.sh b/platform/osx/make_dmg.sh index faf42e635..18ca029f5 100644 --- a/platform/osx/make_dmg.sh +++ b/platform/osx/make_dmg.sh @@ -8,8 +8,10 @@ SYNTAX="make_dmg.sh <environment> <builddir> <apple-id> <apple-password> <arch1> # were found. # Use a tag if what we've built is exactly on one -version=$(git describe --tags --abbrev=0 --match=v2.*.* --exact-match 2> /dev/null | sed -e "s/^v//") -if [ "$?" != "0" ]; then +version=$(git describe --tags --abbrev=0 --match=v2.*.* --exact-match 2> /dev/null) +if [ "$?" == "0" ]; then + version=$(echo $version | sed -e "s/^v//") +else # Otherwise use <branch>-<commit> version="$(basename $(git name-rev --name-only HEAD))-$(git rev-parse --short HEAD)" fi |
