annotate deploy/linux/build-and-test-appimage.sh @ 1924:6ec18c2566e7

Attempt to thread the appimage build/test together
author Chris Cannam
date Tue, 03 Jul 2018 14:13:27 +0100
parents
children b12e5a6be81f
rev   line source
Chris@1924 1 #!/bin/bash
Chris@1924 2 #
Chris@1924 3 # Docker required
Chris@1924 4
Chris@1924 5 set -eu
Chris@1924 6
Chris@1924 7 current=$(hg id | awk '{ print $1; }')
Chris@1924 8
Chris@1924 9 case "$current" in
Chris@1924 10 *+) echo "ERROR: Current working copy has been modified - unmodified copy required so we know we can check it out separately and obtain the same contents"; exit 2;;
Chris@1924 11 *);;
Chris@1924 12 esac
Chris@1924 13
Chris@1924 14 echo
Chris@1924 15 echo -n "Building appimage from revision $current..."
Chris@1924 16
Chris@1924 17 dockerdir=deploy/linux/docker
Chris@1924 18
Chris@1924 19 cat "$dockerdir"/Dockerfile_appimage.in | \
Chris@1924 20 perl -p -e "s/\[\[REVISION\]\]/$current/g" > \
Chris@1924 21 "$dockerdir"/Dockerfile_appimage.gen
Chris@1924 22
Chris@1924 23 cat "$dockerdir"/Dockerfile_test_appimage.in | \
Chris@1924 24 perl -p -e "s/\[\[REVISION\]\]/$current/g" > \
Chris@1924 25 "$dockerdir"/Dockerfile_test_appimage.gen
Chris@1924 26
Chris@1924 27 "$dockerdir"/build.sh appimage
Chris@1924 28
Chris@1924 29 sudo docker build -f "$dockerdir"/Dockerfile_test_appimage.gen "$dockerdir"