Mercurial > hg > sonic-annotator
annotate deploy/clean-build-and-package @ 379:276c3764ab10
Mac build (but not yet package)
author | Chris Cannam |
---|---|
date | Fri, 05 Jun 2020 15:10:22 +0100 |
parents | a296bbde0861 |
children | e4c3c99d219c |
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@379 | 19 qmake="$HOME/code/qt-builds/qt-5.14.2-static-nogui/bin/qmake" |
Chris@379 | 20 |
Chris@379 | 21 echo "Proceed to rebuild, package, and sign version $version using" |
Chris@379 | 22 echo -n "qmake path \"$qmake\" [Yn] ? " |
Chris@379 | 23 read yn |
Chris@379 | 24 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac |
Chris@379 | 25 echo "Proceeding" |
Chris@379 | 26 |
Chris@379 | 27 ./repoint install |
Chris@379 | 28 |
Chris@379 | 29 rm -rf .qmake.stash |
Chris@379 | 30 "$qmake" -r |
Chris@379 | 31 make clean |
Chris@379 | 32 make -j3 |
Chris@371 | 33 |
Chris@371 | 34 else |
Chris@371 | 35 |
Chris@371 | 36 echo -n "Proceed to rebuild and package version $version [Yn] ? " |
Chris@371 | 37 read yn |
Chris@371 | 38 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac |
Chris@371 | 39 echo "Proceeding" |
Chris@371 | 40 |
Chris@371 | 41 ./deploy/linux/build-and-test-appimage.sh |
Chris@371 | 42 |
Chris@371 | 43 squashedversion=$(echo "$version" | sed 's/_-//g') |
Chris@371 | 44 |
Chris@371 | 45 dir="sonic-annotator-$version-linux64" |
Chris@371 | 46 |
Chris@371 | 47 ( |
Chris@371 | 48 cd deploy/linux/docker/output |
Chris@378 | 49 mkdir -p "$dir/static" |
Chris@378 | 50 cp sonic-annotator "$dir/sonic-annotator" |
Chris@378 | 51 cp SonicAnnotator-"$current"-x86_64.AppImage "$dir/static/sonic-annotator" |
Chris@371 | 52 chmod +x "$dir/sonic-annotator" |
Chris@378 | 53 chmod +x "$dir/static/sonic-annotator" |
Chris@371 | 54 cp ../../../../README.md "$dir" |
Chris@371 | 55 cp ../../../../CHANGELOG "$dir" |
Chris@371 | 56 cp ../../../../COPYING "$dir" |
Chris@371 | 57 cp ../../../../CITATION "$dir" |
Chris@371 | 58 tar cvzf "$dir.tar.gz" "$dir" |
Chris@371 | 59 rm -rf "$dir" |
Chris@371 | 60 ) |
Chris@371 | 61 |
Chris@371 | 62 mv deploy/linux/docker/output/"$dir".tar.gz packages/ |
Chris@371 | 63 |
Chris@371 | 64 fi |
Chris@371 | 65 |
Chris@371 | 66 echo "Done" |
Chris@371 | 67 |