Mercurial > hg > sonic-visualiser
annotate deploy/clean-build-and-package @ 2577:0d35663085d0
Subrepo update
author | Chris Cannam |
---|---|
date | Tue, 21 Jul 2020 14:05:20 +0100 |
parents | 32718f05903d |
children | af1a7d76539d |
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@2404 | 32 rm -rf "$volume" |
Chris@2392 | 33 rm -f "$dmg" |
Chris@2392 | 34 |
Chris@2392 | 35 ./repoint install |
Chris@2392 | 36 |
Chris@2392 | 37 rm -rf .qmake.stash |
Chris@2536 | 38 "$qmake" -set SV_PERSISTENT_DEFINES "WITH_FEEDBACK_REQUEST" |
Chris@2392 | 39 "$qmake" -r |
Chris@2392 | 40 make clean |
Chris@2392 | 41 make -j3 |
Chris@2392 | 42 deploy/osx/deploy-and-package.sh |
Chris@2392 | 43 |
Chris@2392 | 44 mv "$dmg" packages/ |
Chris@2392 | 45 |
Chris@2392 | 46 else |
Chris@2392 | 47 |
Chris@2392 | 48 echo -n "Proceed to rebuild and package version $version [Yn] ? " |
Chris@2392 | 49 read yn |
Chris@2392 | 50 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac |
Chris@2392 | 51 echo "Proceeding" |
Chris@2392 | 52 |
Chris@2392 | 53 ./deploy/linux/build-and-test-appimage.sh |
Chris@2392 | 54 |
Chris@2392 | 55 squashedversion=$(echo "$version" | sed 's/_-//g') |
Chris@2392 | 56 |
Chris@2392 | 57 mv deploy/linux/docker/output/SonicVisualiser-"$current"-x86_64.AppImage \ |
Chris@2392 | 58 packages/SonicVisualiser-"$squashedversion"-x86_64.AppImage |
Chris@2392 | 59 |
Chris@2392 | 60 ./deploy/linux/build-and-test-deb.sh |
Chris@2392 | 61 |
Chris@2392 | 62 mv deploy/linux/docker/output/sonic-visualiser_"$version"_amd64.deb \ |
Chris@2392 | 63 packages/ |
Chris@2390 | 64 fi |
Chris@2390 | 65 |
Chris@2390 | 66 echo "Done" |
Chris@2390 | 67 |