Fix .dmg naming yet again; sed was breaking the $? check.
authorCarl Hetherington <cth@carlh.net>
Tue, 18 Jan 2022 21:06:56 +0000 (22:06 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 18 Jan 2022 21:06:56 +0000 (22:06 +0100)
platform/osx/make_dmg.sh

index faf42e6359b6cdc0e6b74f470786d420c2ec20c5..18ca029f5ce0be2a7923ca27892c6454c1ef6726 100644 (file)
@@ -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