Chris@371: #!/bin/bash Chris@371: Chris@371: set -eu Chris@371: Chris@371: current=$(hg id | awk '{ print $1; }') Chris@371: Chris@371: case "$current" in Chris@371: *+) echo "ERROR: Current working copy has been modified - not proceeding";exit 2;; Chris@371: *);; Chris@371: esac Chris@371: Chris@371: version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` Chris@371: Chris@371: mkdir -p packages Chris@371: echo Chris@371: Chris@371: if [ -d /Applications ]; then Chris@371: Chris@379: qmake="$HOME/code/qt-builds/qt-5.14.2-static-nogui/bin/qmake" Chris@379: Chris@379: echo "Proceed to rebuild, package, and sign version $version using" Chris@379: echo -n "qmake path \"$qmake\" [Yn] ? " Chris@379: read yn Chris@379: case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac Chris@379: echo "Proceeding" Chris@379: Chris@379: ./repoint install Chris@379: Chris@379: rm -rf .qmake.stash Chris@379: "$qmake" -r Chris@379: make clean Chris@379: make -j3 Chris@371: Chris@380: deploy/osx/notarize.sh sonic-annotator Chris@380: Chris@371: else Chris@371: Chris@371: echo -n "Proceed to rebuild and package version $version [Yn] ? " Chris@371: read yn Chris@371: case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac Chris@371: echo "Proceeding" Chris@371: Chris@371: ./deploy/linux/build-and-test-appimage.sh Chris@371: Chris@371: squashedversion=$(echo "$version" | sed 's/_-//g') Chris@371: Chris@371: dir="sonic-annotator-$version-linux64" Chris@371: Chris@371: ( Chris@371: cd deploy/linux/docker/output Chris@378: mkdir -p "$dir/static" Chris@378: cp sonic-annotator "$dir/sonic-annotator" Chris@378: cp SonicAnnotator-"$current"-x86_64.AppImage "$dir/static/sonic-annotator" Chris@371: chmod +x "$dir/sonic-annotator" Chris@378: chmod +x "$dir/static/sonic-annotator" Chris@371: cp ../../../../README.md "$dir" Chris@371: cp ../../../../CHANGELOG "$dir" Chris@371: cp ../../../../COPYING "$dir" Chris@371: cp ../../../../CITATION "$dir" Chris@371: tar cvzf "$dir.tar.gz" "$dir" Chris@371: rm -rf "$dir" Chris@371: ) Chris@371: Chris@371: mv deploy/linux/docker/output/"$dir".tar.gz packages/ Chris@371: Chris@371: fi Chris@371: Chris@371: echo "Done" Chris@371: