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@372: : Chris@371: 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@371: mkdir -p "$dir" Chris@371: 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: