view deploy/src/archive.sh @ 1582:7fbe87a9ba9c dev/refactor-piper-related

Invert control, injecting a server path on construction. Also add initializer_list constructor for multiple servers.
author Lucas Thompson <lucas.thompson@qmul.ac.uk>
date Thu, 09 Feb 2017 14:32:07 +0000
parents 0fd39f67a6ee
children bd14a0f69b60
line wrap: on
line source
#!/bin/bash

set -eu

tag=`hg tags | grep '^sv_v' | head -1 | awk '{ print $1; }'`

v=`echo "$tag" | sed 's/sv_v//' | sed 's/_.*$//'`

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