# HG changeset patch # User Chris Cannam # Date 1462457156 -3600 # Node ID 0fd39f67a6ee3c7c333a6e1f60695cb70ac96a10 # Parent f5ba024933a24e12dbbe7c607204af6b8ed42ba4 Make archiver check & complain if the appropriate docs page returns a 404 diff -r f5ba024933a2 -r 0fd39f67a6ee deploy/src/archive.sh --- a/deploy/src/archive.sh Wed May 04 10:27:26 2016 +0100 +++ b/deploy/src/archive.sh Thu May 05 15:05:56 2016 +0100 @@ -1,10 +1,27 @@ #!/bin/bash +set -eu + tag=`hg tags | grep '^sv_v' | head -1 | awk '{ print $1; }'` -v=`echo "$tag" |sed 's/sv_v//'` +v=`echo "$tag" | sed 's/sv_v//' | sed 's/_.*$//'` -echo "Packaging up version $v from tag $tag..." +echo +echo -n "Packaging up version $v from tag $tag... " hg archive -r"$tag" --subrepos --exclude sv-dependency-builds /tmp/sonic-visualiser-"$v".tar.gz +echo Done +echo + +# Test that the appropriate version of the docs exist on the website + +doc_url="http://sonicvisualiser.org/doc/reference/$v/en/" +doc_status=$(curl -sL -w "%{http_code}" "$doc_url" -o /dev/null) + +if [ "$doc_status" = "404" ]; then + echo "*** WARNING: Documentation URL returns a 404:" + echo "*** $doc_url" + echo "*** Please fix this before release!" + echo +fi