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@382: deploy/osx/sign.sh sonic-annotator Chris@380: deploy/osx/notarize.sh sonic-annotator Chris@380: Chris@383: dir="sonic-annotator-$version-macos" Chris@383: mkdir -p "$dir" Chris@383: cp sonic-annotator "$dir/" Chris@383: cp README.md CHANGELOG COPYING CITATION "$dir/" Chris@383: tar cvzf "$dir.tar.gz" "$dir" Chris@383: rm -rf "$dir" Chris@383: Chris@383: mv "$dir.tar.gz" packages/ Chris@383: 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@384: dir="sonic-annotator-$version-linux64-static" Chris@371: Chris@371: ( Chris@371: cd deploy/linux/docker/output Chris@384: mkdir -p "$dir" Chris@384: cp SonicAnnotator-"$current"-x86_64.AppImage "$dir/sonic-annotator" Chris@371: chmod +x "$dir/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: