Mercurial > hg > sonic-visualiser
annotate deploy/src/archive.sh @ 2152:60d78294ea3a
Oookay... Travis's Trusty image is now too old for the bundled hg to be able to connect to Bitbucket after the latter switched off TLS 1.0 and 1.1 support this month. So we must either use a newer image, or find another workaround. Let's try the newer image first, since we'd probably be using that already if it had existed when we set this up
author | Chris Cannam |
---|---|
date | Thu, 06 Dec 2018 09:36:08 +0000 |
parents | 471b0fb002ea |
children | d436e75169e3 |
rev | line source |
---|---|
Chris@654 | 1 #!/bin/bash |
Chris@654 | 2 |
Chris@1158 | 3 set -eu |
Chris@1158 | 4 |
Chris@654 | 5 tag=`hg tags | grep '^sv_v' | head -1 | awk '{ print $1; }'` |
Chris@654 | 6 |
Chris@1158 | 7 v=`echo "$tag" | sed 's/sv_v//' | sed 's/_.*$//'` |
Chris@654 | 8 |
Chris@1868 | 9 current=$(hg id | awk '{ print $1; }') |
Chris@1868 | 10 |
Chris@1868 | 11 case "$current" in |
Chris@1868 | 12 *+) echo "ERROR: Current working copy has been modified - unmodified copy required so we can update to tag and back again safely"; exit 2;; |
Chris@1868 | 13 *);; |
Chris@1868 | 14 esac |
Chris@1868 | 15 |
Chris@1158 | 16 echo |
Chris@1158 | 17 echo -n "Packaging up version $v from tag $tag... " |
Chris@654 | 18 |
Chris@1868 | 19 hg update -r"$tag" |
Chris@1868 | 20 |
Chris@1868 | 21 ./repoint archive /tmp/sonic-visualiser-"$v".tar.gz --exclude sv-dependency-builds repoint.pri |
Chris@1868 | 22 |
Chris@1868 | 23 hg update -r"$current" |
Chris@654 | 24 |
Chris@1158 | 25 echo Done |
Chris@1158 | 26 echo |
Chris@1158 | 27 |
Chris@1158 | 28 # Test that the appropriate version of the docs exist on the website |
Chris@1158 | 29 |
Chris@1158 | 30 doc_url="http://sonicvisualiser.org/doc/reference/$v/en/" |
Chris@1158 | 31 doc_status=$(curl -sL -w "%{http_code}" "$doc_url" -o /dev/null) |
Chris@1158 | 32 |
Chris@1158 | 33 if [ "$doc_status" = "404" ]; then |
Chris@1158 | 34 echo "*** WARNING: Documentation URL returns a 404:" |
Chris@1158 | 35 echo "*** $doc_url" |
Chris@1158 | 36 echo "*** Please fix this before release!" |
Chris@1771 | 37 echo "*** And remember to update the link from" |
Chris@1771 | 38 echo " http://www.sonicvisualiser.org/documentation.html !" |
Chris@1158 | 39 echo |
Chris@1158 | 40 fi |