annotate 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
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