Chris@2390: #!/bin/bash Chris@2390: Chris@2390: set -eu Chris@2390: Chris@2390: current=$(hg id | awk '{ print $1; }') Chris@2390: Chris@2392: #case "$current" in Chris@2392: # *+) echo "ERROR: Current working copy has been modified - not proceeding"; exit 2;; Chris@2392: # *);; Chris@2392: #esac Chris@2390: Chris@2390: version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` Chris@2390: Chris@2392: mkdir -p packages Chris@2392: echo Chris@2390: Chris@2392: if [ -d /Applications ]; then Chris@2392: Chris@2392: qmake=$(grep '^# Command: ' Makefile | awk '{ print $3; }') Chris@2392: Chris@2392: echo "Proceed to rebuild, package, and sign version $version using" Chris@2392: echo -n "qmake path \"$qmake\" [Yn] ? " Chris@2392: read yn Chris@2392: case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac Chris@2392: echo "Proceeding" Chris@2392: Chris@2392: app="Sonic Visualiser" Chris@2392: volume="$app"-"$version" Chris@2392: dmg="$volume".dmg Chris@2392: Chris@2392: rm -rf "$app.app" Chris@2392: rm -f "$dmg" Chris@2392: Chris@2392: ./repoint install Chris@2392: Chris@2392: rm -rf .qmake.stash Chris@2392: "$qmake" -r Chris@2392: make clean Chris@2392: make -j3 Chris@2392: deploy/osx/deploy-and-package.sh Chris@2392: Chris@2392: mv "$dmg" packages/ Chris@2392: Chris@2392: else Chris@2392: Chris@2392: echo -n "Proceed to rebuild and package version $version [Yn] ? " Chris@2392: read yn Chris@2392: case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac Chris@2392: echo "Proceeding" Chris@2392: Chris@2392: ./deploy/linux/build-and-test-appimage.sh Chris@2392: Chris@2392: squashedversion=$(echo "$version" | sed 's/_-//g') Chris@2392: Chris@2392: mv deploy/linux/docker/output/SonicVisualiser-"$current"-x86_64.AppImage \ Chris@2392: packages/SonicVisualiser-"$squashedversion"-x86_64.AppImage Chris@2392: Chris@2392: ./deploy/linux/build-and-test-deb.sh Chris@2392: Chris@2392: mv deploy/linux/docker/output/sonic-visualiser_"$version"_amd64.deb \ Chris@2392: packages/ Chris@2390: fi Chris@2390: Chris@2390: echo "Done" Chris@2390: