Mercurial > hg > sonic-annotator
annotate deploy/src/archive.sh @ 399:a3912193ce69 tip
Default branch is now named default on git as well as hg, in case we ever want to switch to mirroring in the other direction
author | Chris Cannam |
---|---|
date | Thu, 27 Aug 2020 15:57:37 +0100 |
parents | a82030ec7b1f |
children |
rev | line source |
---|---|
Chris@173 | 1 #!/bin/bash |
Chris@173 | 2 |
Chris@173 | 3 tag=`hg tags | grep '^sonic-annotator-' | head -1 | awk '{ print $1; }'` |
Chris@173 | 4 |
Chris@173 | 5 v=`echo "$tag" |sed 's/sonic-annotator-//'` |
Chris@173 | 6 |
Chris@397 | 7 echo -n "Package up source code for version $v from tag $tag [Yn] ? " |
Chris@397 | 8 read yn |
Chris@397 | 9 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac |
Chris@397 | 10 echo "Proceeding" |
Chris@173 | 11 |
Chris@397 | 12 current=$(hg id | awk '{ print $1; }') |
Chris@173 | 13 |
Chris@397 | 14 case "$current" in |
Chris@397 | 15 *+) echo "ERROR: Current working copy has been modified - unmodified copy required so we can update to tag and back again safely"; exit 2;; |
Chris@397 | 16 *);; |
Chris@397 | 17 esac |
Chris@397 | 18 |
Chris@397 | 19 echo |
Chris@397 | 20 echo -n "Packaging up version $v from tag $tag... " |
Chris@397 | 21 |
Chris@397 | 22 mkdir -p packages |
Chris@397 | 23 |
Chris@397 | 24 hg update -r"$tag" |
Chris@397 | 25 |
Chris@397 | 26 ./repoint archive "$(pwd)"/packages/sonic-annotator-"$v".tar.gz --exclude sv-dependency-builds repoint.pri |
Chris@397 | 27 |
Chris@397 | 28 hg update -r"$current" |
Chris@397 | 29 |
Chris@397 | 30 echo Done |
Chris@397 | 31 echo |