changeset 1868:471b0fb002ea

First cut at updating archive scripts to use Repoint
author Chris Cannam
date Tue, 19 Jun 2018 15:20:56 +0100
parents ad590578bf57
children b578440bbca6
files deploy/src/archive-tip.sh deploy/src/archive.sh
diffstat 2 files changed, 25 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/src/archive-tip.sh	Tue Jun 19 15:20:42 2018 +0100
+++ b/deploy/src/archive-tip.sh	Tue Jun 19 15:20:56 2018 +0100
@@ -1,8 +1,18 @@
 #!/bin/bash
 
-tag=`hg id | awk '{ print $1; }'`
+id=`hg id | awk '{ print $1; }'`
 
-echo "Packaging from tag $tag..."
+case "$id" in
+    *+) echo "ERROR: Current working copy has been modified - unmodified copy required"; exit 2;;
+    *);;
+esac
 
-hg archive -r"$tag" --subrepos --exclude sv-dependency-builds /tmp/sonic-visualiser-"$tag".tar.gz
+echo "Packaging from id $id..."
 
+hg update -r"$id"
+
+./repoint archive /tmp/sonic-visualiser-"$v".tar.gz --exclude sv-dependency-builds repoint.pri
+
+echo Done
+echo
+
--- a/deploy/src/archive.sh	Tue Jun 19 15:20:42 2018 +0100
+++ b/deploy/src/archive.sh	Tue Jun 19 15:20:56 2018 +0100
@@ -6,10 +6,21 @@
 
 v=`echo "$tag" | sed 's/sv_v//' | sed 's/_.*$//'`
 
+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... "
 
-hg archive -r"$tag" --subrepos --exclude sv-dependency-builds /tmp/sonic-visualiser-"$v".tar.gz
+hg update -r"$tag"
+
+./repoint archive /tmp/sonic-visualiser-"$v".tar.gz --exclude sv-dependency-builds repoint.pri
+
+hg update -r"$current"
 
 echo Done
 echo