comparison deploy/src/archive.sh @ 1158:0fd39f67a6ee 3.0-integration

Make archiver check & complain if the appropriate docs page returns a 404
author Chris Cannam
date Thu, 05 May 2016 15:05:56 +0100
parents 7adcad79d548
children bd14a0f69b60
comparison
equal deleted inserted replaced
1157:f5ba024933a2 1158:0fd39f67a6ee
1 #!/bin/bash 1 #!/bin/bash
2
3 set -eu
2 4
3 tag=`hg tags | grep '^sv_v' | head -1 | awk '{ print $1; }'` 5 tag=`hg tags | grep '^sv_v' | head -1 | awk '{ print $1; }'`
4 6
5 v=`echo "$tag" |sed 's/sv_v//'` 7 v=`echo "$tag" | sed 's/sv_v//' | sed 's/_.*$//'`
6 8
7 echo "Packaging up version $v from tag $tag..." 9 echo
10 echo -n "Packaging up version $v from tag $tag... "
8 11
9 hg archive -r"$tag" --subrepos --exclude sv-dependency-builds /tmp/sonic-visualiser-"$v".tar.gz 12 hg archive -r"$tag" --subrepos --exclude sv-dependency-builds /tmp/sonic-visualiser-"$v".tar.gz
10 13
14 echo Done
15 echo
16
17 # Test that the appropriate version of the docs exist on the website
18
19 doc_url="http://sonicvisualiser.org/doc/reference/$v/en/"
20 doc_status=$(curl -sL -w "%{http_code}" "$doc_url" -o /dev/null)
21
22 if [ "$doc_status" = "404" ]; then
23 echo "*** WARNING: Documentation URL returns a 404:"
24 echo "*** $doc_url"
25 echo "*** Please fix this before release!"
26 echo
27 fi