comparison deploy/clean-build-and-package @ 648:b80deac5ada8

Bring in another package script from SV
author Chris Cannam
date Tue, 22 Oct 2019 17:12:44 +0100
parents
children 808f40e418f9
comparison
equal deleted inserted replaced
647:639deb9d6bd4 648:b80deac5ada8
1 #!/bin/bash
2
3 set -eu
4
5 current=$(hg id | awk '{ print $1; }')
6
7 case "$current" in
8 *+) echo "ERROR: Current working copy has been modified - not proceeding";exit 2;;
9 *);;
10 esac
11
12 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h`
13
14 mkdir -p packages
15 echo
16
17 if [ -d /Applications ]; then
18
19 qmake=$(grep '^# Command: ' Makefile | awk '{ print $3; }')
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="Tony"
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/Tony-"$current"-x86_64.AppImage \
56 packages/Tony-"$squashedversion"-x86_64.AppImage
57
58 ./deploy/linux/build-and-test-deb.sh
59
60 mv deploy/linux/docker/output/tony_"$version"_amd64.deb \
61 packages/
62 fi
63
64 echo "Done"
65