# HG changeset patch # User Chris Cannam # Date 1591720379 -3600 # Node ID a82030ec7b1f6f7c5bfd125e38d1123570fb1a78 # Parent e5177632815839525af9d063119eff4f9b2fe889 Update archive script for Repoint diff -r e51776328158 -r a82030ec7b1f deploy/src/archive.sh --- a/deploy/src/archive.sh Tue Jun 09 17:30:47 2020 +0100 +++ b/deploy/src/archive.sh Tue Jun 09 17:32:59 2020 +0100 @@ -4,7 +4,28 @@ v=`echo "$tag" |sed 's/sonic-annotator-//'` -echo "Packaging up version $v from tag $tag..." +echo -n "Package up source code for version $v from tag $tag [Yn] ? " +read yn +case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac +echo "Proceeding" -hg archive -r"$tag" --subrepos --exclude sv-dependency-builds /tmp/sonic-annotator-"$v".tar.gz +current=$(hg id | awk '{ print $1; }') +case "$current" in + *+) echo "ERROR: Current working copy has been modified - unmodified copy required so we can update to tag and back again safely"; exit 2;; + *);; +esac + +echo +echo -n "Packaging up version $v from tag $tag... " + +mkdir -p packages + +hg update -r"$tag" + +./repoint archive "$(pwd)"/packages/sonic-annotator-"$v".tar.gz --exclude sv-dependency-builds repoint.pri + +hg update -r"$current" + +echo Done +echo