comparison 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
comparison
equal deleted inserted replaced
2391:d436e75169e3 2392:ab2d0fe8f0b7
2 2
3 set -eu 3 set -eu
4 4
5 current=$(hg id | awk '{ print $1; }') 5 current=$(hg id | awk '{ print $1; }')
6 6
7 case "$current" in 7 #case "$current" in
8 *+) echo "ERROR: Current working copy has been modified - not proceeding"; exit 2;; 8 # *+) echo "ERROR: Current working copy has been modified - not proceeding"; exit 2;;
9 *);; 9 # *);;
10 esac 10 #esac
11 11
12 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` 12 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h`
13 13
14 echo -n "Proceed to rebuild and package version $version [Yn] ? " 14 mkdir -p packages
15 read yn 15 echo
16 16
17 if [ -z "$yn" ]; then 17 if [ -d /Applications ]; then
18 yn=y 18
19 elif [ "$yn" = "Y" ]; then 19 qmake=$(grep '^# Command: ' Makefile | awk '{ print $3; }')
20 yn=y 20
21 echo "Proceed to rebuild, package, and sign version $version using"
22 echo -n "qmake path \"$qmake\" [Yn] ? "
23 read yn
24 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
25 echo "Proceeding"
26
27 app="Sonic Visualiser"
28 volume="$app"-"$version"
29 dmg="$volume".dmg
30
31 rm -rf "$app.app"
32 rm -f "$dmg"
33
34 ./repoint install
35
36 rm -rf .qmake.stash
37 "$qmake" -r
38 make clean
39 make -j3
40 deploy/osx/deploy-and-package.sh
41
42 mv "$dmg" packages/
43
44 else
45
46 echo -n "Proceed to rebuild and package version $version [Yn] ? "
47 read yn
48 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
49 echo "Proceeding"
50
51 ./deploy/linux/build-and-test-appimage.sh
52
53 squashedversion=$(echo "$version" | sed 's/_-//g')
54
55 mv deploy/linux/docker/output/SonicVisualiser-"$current"-x86_64.AppImage \
56 packages/SonicVisualiser-"$squashedversion"-x86_64.AppImage
57
58 ./deploy/linux/build-and-test-deb.sh
59
60 mv deploy/linux/docker/output/sonic-visualiser_"$version"_amd64.deb \
61 packages/
21 fi 62 fi
22
23 if [ "$yn" != "y" ]; then
24 exit 3
25 fi
26
27 echo "Proceeding"
28
29 mkdir -p packages
30
31 ./deploy/linux/build-and-test-appimage.sh
32
33 squashedversion=$(echo "$version" | sed 's/_-//g')
34
35 mv deploy/linux/docker/output/SonicVisualiser-"$current"-x86_64.AppImage \
36 packages/SonicVisualiser-"$squashedversion"-x86_64.AppImage
37
38 ./deploy/linux/build-and-test-deb.sh
39
40 mv deploy/linux/docker/output/sonic-visualiser_"$version"_amd64.deb \
41 packages/
42 63
43 echo "Done" 64 echo "Done"
44 65