changeset 397:a82030ec7b1f sonic-annotator-1.6

Update archive script for Repoint
author Chris Cannam
date Tue, 09 Jun 2020 17:32:59 +0100
parents e51776328158
children 30c64a311d9c
files deploy/src/archive.sh
diffstat 1 files changed, 23 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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