Mercurial > hg > sonic-visualiser
annotate deploy/clean-build-and-package @ 2587:7482b1dea0b9
Added tag sv_v4.2pre1 for changeset 666460ea3b3b
author | Chris Cannam |
---|---|
date | Thu, 23 Jul 2020 18:08:19 +0100 |
parents | af1a7d76539d |
children | 4448639b9bb1 |
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@2582 | 19 if [ ! -f Makefile ]; then |
Chris@2582 | 20 echo "You must have run a routine normal build at least once before this, so I can see which Qt settings to use" |
Chris@2582 | 21 exit 1 |
Chris@2582 | 22 fi |
Chris@2582 | 23 |
Chris@2392 | 24 qmake=$(grep '^# Command: ' Makefile | awk '{ print $3; }') |
Chris@2392 | 25 |
Chris@2392 | 26 echo "Proceed to rebuild, package, and sign version $version using" |
Chris@2392 | 27 echo -n "qmake path \"$qmake\" [Yn] ? " |
Chris@2392 | 28 read yn |
Chris@2392 | 29 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac |
Chris@2392 | 30 echo "Proceeding" |
Chris@2392 | 31 |
Chris@2392 | 32 app="Sonic Visualiser" |
Chris@2392 | 33 volume="$app"-"$version" |
Chris@2392 | 34 dmg="$volume".dmg |
Chris@2392 | 35 |
Chris@2392 | 36 rm -rf "$app.app" |
Chris@2404 | 37 rm -rf "$volume" |
Chris@2392 | 38 rm -f "$dmg" |
Chris@2392 | 39 |
Chris@2392 | 40 ./repoint install |
Chris@2392 | 41 |
Chris@2392 | 42 rm -rf .qmake.stash |
Chris@2536 | 43 "$qmake" -set SV_PERSISTENT_DEFINES "WITH_FEEDBACK_REQUEST" |
Chris@2392 | 44 "$qmake" -r |
Chris@2392 | 45 make clean |
Chris@2392 | 46 make -j3 |
Chris@2392 | 47 deploy/osx/deploy-and-package.sh |
Chris@2392 | 48 |
Chris@2392 | 49 mv "$dmg" packages/ |
Chris@2392 | 50 |
Chris@2392 | 51 else |
Chris@2392 | 52 |
Chris@2392 | 53 echo -n "Proceed to rebuild and package version $version [Yn] ? " |
Chris@2392 | 54 read yn |
Chris@2392 | 55 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac |
Chris@2392 | 56 echo "Proceeding" |
Chris@2392 | 57 |
Chris@2392 | 58 ./deploy/linux/build-and-test-appimage.sh |
Chris@2392 | 59 |
Chris@2392 | 60 squashedversion=$(echo "$version" | sed 's/_-//g') |
Chris@2392 | 61 |
Chris@2392 | 62 mv deploy/linux/docker/output/SonicVisualiser-"$current"-x86_64.AppImage \ |
Chris@2392 | 63 packages/SonicVisualiser-"$squashedversion"-x86_64.AppImage |
Chris@2392 | 64 |
Chris@2392 | 65 ./deploy/linux/build-and-test-deb.sh |
Chris@2392 | 66 |
Chris@2392 | 67 mv deploy/linux/docker/output/sonic-visualiser_"$version"_amd64.deb \ |
Chris@2392 | 68 packages/ |
Chris@2390 | 69 fi |
Chris@2390 | 70 |
Chris@2390 | 71 echo "Done" |
Chris@2390 | 72 |