annotate deploy/src/archive.sh @ 2558:7535f13569fa

Move test/ to export-tests/ (so it can be distinguished from other test subdirs) and exclude from archive
author Chris Cannam
date Mon, 15 Jun 2020 17:45:04 +0100
parents a46ca166c29c
children
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@2432 9 echo -n "Package up source code for version $v from tag $tag [Yn] ? "
Chris@2432 10 read yn
Chris@2432 11 case "$yn" in "") ;; [Yy]) ;; *) exit 3;; esac
Chris@2432 12 echo "Proceeding"
Chris@2432 13
Chris@1868 14 current=$(hg id | awk '{ print $1; }')
Chris@1868 15
Chris@1868 16 case "$current" in
Chris@1868 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@1868 18 *);;
Chris@1868 19 esac
Chris@1868 20
Chris@1158 21 echo
Chris@1158 22 echo -n "Packaging up version $v from tag $tag... "
Chris@654 23
Chris@2391 24 mkdir -p packages
Chris@2391 25
Chris@1868 26 hg update -r"$tag"
Chris@1868 27
Chris@2558 28 ./repoint archive "$(pwd)"/packages/sonic-visualiser-"$v".tar.gz --exclude sv-dependency-builds export-tests repoint.pri
Chris@1868 29
Chris@1868 30 hg update -r"$current"
Chris@654 31
Chris@1158 32 echo Done
Chris@1158 33 echo
Chris@1158 34
Chris@1158 35 # Test that the appropriate version of the docs exist on the website
Chris@1158 36
Chris@1158 37 doc_url="http://sonicvisualiser.org/doc/reference/$v/en/"
Chris@1158 38 doc_status=$(curl -sL -w "%{http_code}" "$doc_url" -o /dev/null)
Chris@1158 39
Chris@1158 40 if [ "$doc_status" = "404" ]; then
Chris@1158 41 echo "*** WARNING: Documentation URL returns a 404:"
Chris@1158 42 echo "*** $doc_url"
Chris@1158 43 echo "*** Please fix this before release!"
Chris@1771 44 echo "*** And remember to update the link from"
Chris@1771 45 echo " http://www.sonicvisualiser.org/documentation.html !"
Chris@1158 46 echo
Chris@1158 47 fi