comparison deploy/src/archive.sh @ 397:a82030ec7b1f sonic-annotator-1.6

Update archive script for Repoint
author Chris Cannam
date Tue, 09 Jun 2020 17:32:59 +0100
parents 595df44835d6
children
comparison
equal deleted inserted replaced
396:e51776328158 397:a82030ec7b1f
2 2
3 tag=`hg tags | grep '^sonic-annotator-' | head -1 | awk '{ print $1; }'` 3 tag=`hg tags | grep '^sonic-annotator-' | head -1 | awk '{ print $1; }'`
4 4
5 v=`echo "$tag" |sed 's/sonic-annotator-//'` 5 v=`echo "$tag" |sed 's/sonic-annotator-//'`
6 6
7 echo "Packaging up version $v from tag $tag..." 7 echo -n "Package up source code for version $v from tag $tag [Yn] ? "
8 read yn
9 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
10 echo "Proceeding"
8 11
9 hg archive -r"$tag" --subrepos --exclude sv-dependency-builds /tmp/sonic-annotator-"$v".tar.gz 12 current=$(hg id | awk '{ print $1; }')
10 13
14 case "$current" in
15 *+) echo "ERROR: Current working copy has been modified - unmodified copy required so we can update to tag and back again safely"; exit 2;;
16 *);;
17 esac
18
19 echo
20 echo -n "Packaging up version $v from tag $tag... "
21
22 mkdir -p packages
23
24 hg update -r"$tag"
25
26 ./repoint archive "$(pwd)"/packages/sonic-annotator-"$v".tar.gz --exclude sv-dependency-builds repoint.pri
27
28 hg update -r"$current"
29
30 echo Done
31 echo