Mercurial > hg > sonic-visualiser
diff deploy/clean-build-and-package @ 2392:ab2d0fe8f0b7
Additions to Mac build scripting
author | Chris Cannam |
---|---|
date | Mon, 21 Oct 2019 13:07:02 +0100 |
parents | 1f392d58ee88 |
children | ab09e05b0d35 |
line wrap: on
line diff
--- a/deploy/clean-build-and-package Mon Oct 21 10:55:21 2019 +0100 +++ b/deploy/clean-build-and-package Mon Oct 21 13:07:02 2019 +0100 @@ -4,41 +4,62 @@ current=$(hg id | awk '{ print $1; }') -case "$current" in - *+) echo "ERROR: Current working copy has been modified - not proceeding"; exit 2;; - *);; -esac +#case "$current" in +# *+) echo "ERROR: Current working copy has been modified - not proceeding"; exit 2;; +# *);; +#esac version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` -echo -n "Proceed to rebuild and package version $version [Yn] ? " -read yn +mkdir -p packages +echo -if [ -z "$yn" ]; then - yn=y -elif [ "$yn" = "Y" ]; then - yn=y +if [ -d /Applications ]; then + + qmake=$(grep '^# Command: ' Makefile | awk '{ print $3; }') + + echo "Proceed to rebuild, package, and sign version $version using" + echo -n "qmake path \"$qmake\" [Yn] ? " + read yn + case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac + echo "Proceeding" + + app="Sonic Visualiser" + volume="$app"-"$version" + dmg="$volume".dmg + + rm -rf "$app.app" + rm -f "$dmg" + + ./repoint install + + rm -rf .qmake.stash + "$qmake" -r + make clean + make -j3 + deploy/osx/deploy-and-package.sh + + mv "$dmg" packages/ + +else + + echo -n "Proceed to rebuild and package version $version [Yn] ? " + read yn + case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac + echo "Proceeding" + + ./deploy/linux/build-and-test-appimage.sh + + squashedversion=$(echo "$version" | sed 's/_-//g') + + mv deploy/linux/docker/output/SonicVisualiser-"$current"-x86_64.AppImage \ + packages/SonicVisualiser-"$squashedversion"-x86_64.AppImage + + ./deploy/linux/build-and-test-deb.sh + + mv deploy/linux/docker/output/sonic-visualiser_"$version"_amd64.deb \ + packages/ fi -if [ "$yn" != "y" ]; then - exit 3 -fi - -echo "Proceeding" - -mkdir -p packages - -./deploy/linux/build-and-test-appimage.sh - -squashedversion=$(echo "$version" | sed 's/_-//g') - -mv deploy/linux/docker/output/SonicVisualiser-"$current"-x86_64.AppImage \ - packages/SonicVisualiser-"$squashedversion"-x86_64.AppImage - -./deploy/linux/build-and-test-deb.sh - -mv deploy/linux/docker/output/sonic-visualiser_"$version"_amd64.deb \ - packages/ - echo "Done"