Mercurial > hg > easyhg
diff deploy/osx/deploy.sh @ 699:646e48a0d3a5
Some work on macOS packaging
author | Chris Cannam |
---|---|
date | Tue, 11 Dec 2018 16:40:57 +0000 |
parents | 8121a6f9abca |
children | 5afb26b7575a |
line wrap: on
line diff
--- a/deploy/osx/deploy.sh Mon Dec 10 17:52:27 2018 +0000 +++ b/deploy/osx/deploy.sh Tue Dec 11 16:40:57 2018 +0000 @@ -16,15 +16,17 @@ echo " but the .app name must include .app" exit 2 fi -app=EasyMercurial +app=`basename "$source" .app` set -u version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' src/version.h` -case "$version" in - [0-9].[0-9]) bundleVersion="$version".0 ;; - [0-9].[0-9].[0-9]) bundleVersion="$version" ;; - *) echo "Error: Version $version is neither two- nor three-part number" ;; +stem=${version%%-*} +stem=${stem%%pre*} +case "$stem" in + [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 echo @@ -70,14 +72,27 @@ cp COPYING "$volume/COPYING.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" && +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"