Mercurial > hg > sonic-annotator
diff deploy/clean-build-and-package @ 371:a0ff34e9e86b
First cut at Linux AppImage
author | Chris Cannam |
---|---|
date | Fri, 05 Jun 2020 11:08:37 +0100 |
parents | |
children | df443955119c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/clean-build-and-package Fri Jun 05 11:08:37 2020 +0100 @@ -0,0 +1,51 @@ +#!/bin/bash + +set -eu + +current=$(hg id | awk '{ print $1; }') + +case "$current" in + *+) echo "ERROR: Current working copy has been modified - not proceeding";exit 2;; + *);; +esac + +version=`perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h` + +mkdir -p packages +echo + +if [ -d /Applications ]; then + + +else + + echo -n "Proceed to rebuild and package version $version [Yn] ? " + read yn + case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac + echo "Proceeding" + + ./deploy/linux/build-and-test-appimage.sh + + squashedversion=$(echo "$version" | sed 's/_-//g') + + dir="sonic-annotator-$version-linux64" + + ( + cd deploy/linux/docker/output + mkdir -p "$dir" + cp SonicAnnotator-"$current"-x86_64.AppImage "$dir/sonic-annotator" + chmod +x "$dir/sonic-annotator" + cp ../../../../README.md "$dir" + cp ../../../../CHANGELOG "$dir" + cp ../../../../COPYING "$dir" + cp ../../../../CITATION "$dir" + tar cvzf "$dir.tar.gz" "$dir" + rm -rf "$dir" + ) + + mv deploy/linux/docker/output/"$dir".tar.gz packages/ + +fi + +echo "Done" +