diff deploy/osx/deploy.sh @ 1648:105d7d46455e

Handle versions without hyphen separator here
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 06 Mar 2017 10:13:05 +0000
parents 422d7ac46232
children b693b9218f66
line wrap: on
line diff
--- a/deploy/osx/deploy.sh	Mon Mar 06 10:12:35 2017 +0000
+++ b/deploy/osx/deploy.sh	Mon Mar 06 10:13:05 2017 +0000
@@ -22,9 +22,10 @@
 
 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h`
 stem=${version%%-*}
+stem=${stem%%pre*}
 case "$stem" in
-    [0-9].[0-9]) bundleVersion="$version".0 ;;
-    [0-9].[0-9].[0-9]) bundleVersion="$version" ;;
+    [0-9].[0-9]) bundleVersion="$stem".0 ;;
+    [0-9].[0-9].[0-9]) bundleVersion="$stem" ;;
     *) echo "Error: Version stem $stem (of version $version) is neither two- nor three-part number" ;;
 esac