comparison deploy/clean-build-and-package @ 371:a0ff34e9e86b

First cut at Linux AppImage
author Chris Cannam
date Fri, 05 Jun 2020 11:08:37 +0100
parents
children df443955119c
comparison
equal deleted inserted replaced
370:3e0133aa2354 371:a0ff34e9e86b
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
20 else
21
22 echo -n "Proceed to rebuild and package version $version [Yn] ? "
23 read yn
24 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
25 echo "Proceeding"
26
27 ./deploy/linux/build-and-test-appimage.sh
28
29 squashedversion=$(echo "$version" | sed 's/_-//g')
30
31 dir="sonic-annotator-$version-linux64"
32
33 (
34 cd deploy/linux/docker/output
35 mkdir -p "$dir"
36 cp SonicAnnotator-"$current"-x86_64.AppImage "$dir/sonic-annotator"
37 chmod +x "$dir/sonic-annotator"
38 cp ../../../../README.md "$dir"
39 cp ../../../../CHANGELOG "$dir"
40 cp ../../../../COPYING "$dir"
41 cp ../../../../CITATION "$dir"
42 tar cvzf "$dir.tar.gz" "$dir"
43 rm -rf "$dir"
44 )
45
46 mv deploy/linux/docker/output/"$dir".tar.gz packages/
47
48 fi
49
50 echo "Done"
51