annotate deploy/src/archive.sh @ 698:ee97c742d184 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:58:43 +0100
parents eb141af3866c
children
rev   line source
Chris@230 1 #!/bin/bash
Chris@230 2
Chris@610 3 set -eu
Chris@230 4
Chris@610 5 tag=`hg tags | grep '^v' | head -1 | awk '{ print $1; }'`
Chris@230 6
Chris@610 7 v=`echo "$tag" | sed 's/v//' | sed 's/_.*$//'`
Chris@230 8
Chris@686 9 echo -n "Package up source code for version $v from tag $tag [Yn] ? "
Chris@686 10 read yn
Chris@686 11 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
Chris@686 12 echo "Proceeding"
Chris@686 13
Chris@610 14 current=$(hg id | awk '{ print $1; }')
Chris@230 15
Chris@610 16 case "$current" in
Chris@610 17 *+) echo "ERROR: Current working copy has been modified - unmodified copy required so we can update to tag and back again safely"; exit 2;;
Chris@610 18 *);;
Chris@610 19 esac
Chris@610 20
Chris@610 21 echo
Chris@610 22 echo -n "Packaging up version $v from tag $tag... "
Chris@230 23
Chris@610 24 hg update -r"$tag"
Chris@610 25
Chris@661 26 ./repoint archive "$(pwd)"/packages/tony-"$v".tar.gz --exclude sv-dependency-builds repoint.pri testdata pyin/testdata
Chris@610 27
Chris@610 28 hg update -r"$current"
Chris@610 29
Chris@610 30 echo Done
Chris@610 31 echo