annotate deploy/clean-build-and-package @ 2399:ed0e83474d08

Fix idiotic presentation of /a flag as if argument to /n flag
author Chris Cannam
date Wed, 23 Oct 2019 09:32:14 +0100
parents ab09e05b0d35
children 7c09d776d579
rev   line source
Chris@2390 1 #!/bin/bash
Chris@2390 2
Chris@2390 3 set -eu
Chris@2390 4
Chris@2390 5 current=$(hg id | awk '{ print $1; }')
Chris@2390 6
Chris@2396 7 case "$current" in
Chris@2396 8 *+) echo "ERROR: Current working copy has been modified - not proceeding";exit 2;;
Chris@2396 9 *);;
Chris@2396 10 esac
Chris@2390 11
Chris@2390 12 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h`
Chris@2390 13
Chris@2392 14 mkdir -p packages
Chris@2392 15 echo
Chris@2390 16
Chris@2392 17 if [ -d /Applications ]; then
Chris@2392 18
Chris@2392 19 qmake=$(grep '^# Command: ' Makefile | awk '{ print $3; }')
Chris@2392 20
Chris@2392 21 echo "Proceed to rebuild, package, and sign version $version using"
Chris@2392 22 echo -n "qmake path \"$qmake\" [Yn] ? "
Chris@2392 23 read yn
Chris@2392 24 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
Chris@2392 25 echo "Proceeding"
Chris@2392 26
Chris@2392 27 app="Sonic Visualiser"
Chris@2392 28 volume="$app"-"$version"
Chris@2392 29 dmg="$volume".dmg
Chris@2392 30
Chris@2392 31 rm -rf "$app.app"
Chris@2392 32 rm -f "$dmg"
Chris@2392 33
Chris@2392 34 ./repoint install
Chris@2392 35
Chris@2392 36 rm -rf .qmake.stash
Chris@2392 37 "$qmake" -r
Chris@2392 38 make clean
Chris@2392 39 make -j3
Chris@2392 40 deploy/osx/deploy-and-package.sh
Chris@2392 41
Chris@2392 42 mv "$dmg" packages/
Chris@2392 43
Chris@2392 44 else
Chris@2392 45
Chris@2392 46 echo -n "Proceed to rebuild and package version $version [Yn] ? "
Chris@2392 47 read yn
Chris@2392 48 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
Chris@2392 49 echo "Proceeding"
Chris@2392 50
Chris@2392 51 ./deploy/linux/build-and-test-appimage.sh
Chris@2392 52
Chris@2392 53 squashedversion=$(echo "$version" | sed 's/_-//g')
Chris@2392 54
Chris@2392 55 mv deploy/linux/docker/output/SonicVisualiser-"$current"-x86_64.AppImage \
Chris@2392 56 packages/SonicVisualiser-"$squashedversion"-x86_64.AppImage
Chris@2392 57
Chris@2392 58 ./deploy/linux/build-and-test-deb.sh
Chris@2392 59
Chris@2392 60 mv deploy/linux/docker/output/sonic-visualiser_"$version"_amd64.deb \
Chris@2392 61 packages/
Chris@2390 62 fi
Chris@2390 63
Chris@2390 64 echo "Done"
Chris@2390 65