comparison deploy/clean-build-and-package @ 2390:1f392d58ee88

Towards single-script packaging
author Chris Cannam
date Mon, 21 Oct 2019 10:55:15 +0100
parents
children ab2d0fe8f0b7
comparison
equal deleted inserted replaced
2389:0a2cdcbc22e6 2390:1f392d58ee88
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 echo -n "Proceed to rebuild and package version $version [Yn] ? "
15 read yn
16
17 if [ -z "$yn" ]; then
18 yn=y
19 elif [ "$yn" = "Y" ]; then
20 yn=y
21 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
43 echo "Done"
44