Mercurial > hg > sonic-annotator
annotate deploy/clean-build-and-package @ 378:a296bbde0861
Strive to include dynamic (because faster startup) and static (AppImage) builds
author | Chris Cannam |
---|---|
date | Fri, 05 Jun 2020 13:38:22 +0100 |
parents | df443955119c |
children | 276c3764ab10 |
rev | line source |
---|---|
Chris@371 | 1 #!/bin/bash |
Chris@371 | 2 |
Chris@371 | 3 set -eu |
Chris@371 | 4 |
Chris@371 | 5 current=$(hg id | awk '{ print $1; }') |
Chris@371 | 6 |
Chris@371 | 7 case "$current" in |
Chris@371 | 8 *+) echo "ERROR: Current working copy has been modified - not proceeding";exit 2;; |
Chris@371 | 9 *);; |
Chris@371 | 10 esac |
Chris@371 | 11 |
Chris@371 | 12 version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` |
Chris@371 | 13 |
Chris@371 | 14 mkdir -p packages |
Chris@371 | 15 echo |
Chris@371 | 16 |
Chris@371 | 17 if [ -d /Applications ]; then |
Chris@371 | 18 |
Chris@372 | 19 : |
Chris@371 | 20 |
Chris@371 | 21 else |
Chris@371 | 22 |
Chris@371 | 23 echo -n "Proceed to rebuild and package version $version [Yn] ? " |
Chris@371 | 24 read yn |
Chris@371 | 25 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac |
Chris@371 | 26 echo "Proceeding" |
Chris@371 | 27 |
Chris@371 | 28 ./deploy/linux/build-and-test-appimage.sh |
Chris@371 | 29 |
Chris@371 | 30 squashedversion=$(echo "$version" | sed 's/_-//g') |
Chris@371 | 31 |
Chris@371 | 32 dir="sonic-annotator-$version-linux64" |
Chris@371 | 33 |
Chris@371 | 34 ( |
Chris@371 | 35 cd deploy/linux/docker/output |
Chris@378 | 36 mkdir -p "$dir/static" |
Chris@378 | 37 cp sonic-annotator "$dir/sonic-annotator" |
Chris@378 | 38 cp SonicAnnotator-"$current"-x86_64.AppImage "$dir/static/sonic-annotator" |
Chris@371 | 39 chmod +x "$dir/sonic-annotator" |
Chris@378 | 40 chmod +x "$dir/static/sonic-annotator" |
Chris@371 | 41 cp ../../../../README.md "$dir" |
Chris@371 | 42 cp ../../../../CHANGELOG "$dir" |
Chris@371 | 43 cp ../../../../COPYING "$dir" |
Chris@371 | 44 cp ../../../../CITATION "$dir" |
Chris@371 | 45 tar cvzf "$dir.tar.gz" "$dir" |
Chris@371 | 46 rm -rf "$dir" |
Chris@371 | 47 ) |
Chris@371 | 48 |
Chris@371 | 49 mv deploy/linux/docker/output/"$dir".tar.gz packages/ |
Chris@371 | 50 |
Chris@371 | 51 fi |
Chris@371 | 52 |
Chris@371 | 53 echo "Done" |
Chris@371 | 54 |