diff deploy/osx/deploy.sh @ 2374:9ca6872a5d0f

Rework deployment scripts with a separate package/notarize step
author Chris Cannam
date Wed, 16 Oct 2019 13:50:06 +0100
parents 23be8dccb855
children
line wrap: on
line diff
--- a/deploy/osx/deploy.sh	Wed Oct 16 13:05:51 2019 +0100
+++ b/deploy/osx/deploy.sh	Wed Oct 16 13:50:06 2019 +0100
@@ -3,20 +3,23 @@
 set -e
 
 # Execute this from the top-level directory of the project (the one
-# that contains the .app bundle).  Supply the name of the .app bundle
-# as argument (the target will use $app.app regardless, but we need
-# to know the source)
+# that contains the .app bundle).  Supply the name of the application
+# as argument.
+#
+# This now performs *only* the app deployment step - copying in
+# libraries and setting up paths etc. It does not create a
+# package. Use deploy-and-package.sh for that.
 
-source="$1"
-dmg="$2"
-if [ -z "$source" ] || [ ! -d "$source" ] || [ -z "$dmg" ]; then
-	echo "Usage: $0 <source.app> <target-dmg-basename>"
-	echo "  e.g. $0 MyApplication.app MyApplication"
- 	echo "  Version number and .dmg will be appended automatically,"
-        echo "  but the .app name must include .app"
+app="$1"
+source="$app.app"
+
+if [ -z "$app" ] || [ ! -d "$source" ] || [ -n "$2" ]; then
+	echo "Usage: $0 <app>"
+	echo "  e.g. $0 MyApplication"
+ 	echo "  The app bundle must exist in ./<app>.app."
+	echo "  Version number will be extracted from version.h."
 	exit 2
 fi
-app=`basename "$source" .app`
 
 set -u
 
@@ -54,6 +57,10 @@
 cp piper-vamp-simple-server "$source"/Contents/MacOS/
 
 echo
+echo "Copying in lproj directories containing InfoPlist.strings translation files."
+cp -r i18n/*.lproj "$source"/Contents/Resources/
+
+echo
 echo "Writing version $bundleVersion in to bundle."
 echo "(This should be a three-part number: major.minor.point)"
 
@@ -61,49 +68,3 @@
     > "$source"/Contents/Info.plist
 
 echo "Done: check $source/Contents/Info.plist for sanity please"
-
-echo
-echo "Copying in lproj directories containing InfoPlist.strings translation files."
-cp -r i18n/*.lproj "$source"/Contents/Resources/
-
-echo
-echo "Making target tree."
-
-volume="$app"-"$version"
-target="$volume"/"$app".app
-dmg="$dmg"-"$version".dmg
-
-mkdir "$volume" || exit 1
-
-ln -s /Applications "$volume"/Applications
-cp README.md "$volume/README.txt"
-cp README.OSC "$volume/README-OSC.txt"
-cp COPYING "$volume/COPYING.txt"
-cp CHANGELOG "$volume/CHANGELOG.txt"
-cp CITATION "$volume/CITATION.txt"
-cp -rp "$source" "$target"
-
-# update file timestamps so as to make the build date apparent
-find "$volume" -exec touch \{\} \;
-
-echo "Done"
-
-echo
-echo "Code-signing volume..."
-
-deploy/osx/sign.sh "$volume" || exit 1
-
-echo "Done"
-
-echo
-echo "Making dmg..."
-
-hdiutil create -srcfolder "$volume" "$dmg" -volname "$volume" -fs HFS+ && 
-	rm -r "$volume"
-
-echo
-echo "Signing dmg..."
-
-codesign -s "Developer ID Application: Chris Cannam" -fv "$dmg"
-
-echo "Done"