comparison 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
comparison
equal deleted inserted replaced
1923:4ec4c1b9d367 1924:6ec18c2566e7
1 #!/bin/bash
2 #
3 # Docker required
4
5 set -eu
6
7 current=$(hg id | awk '{ print $1; }')
8
9 case "$current" in
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;;
11 *);;
12 esac
13
14 echo
15 echo -n "Building appimage from revision $current..."
16
17 dockerdir=deploy/linux/docker
18
19 cat "$dockerdir"/Dockerfile_appimage.in | \
20 perl -p -e "s/\[\[REVISION\]\]/$current/g" > \
21 "$dockerdir"/Dockerfile_appimage.gen
22
23 cat "$dockerdir"/Dockerfile_test_appimage.in | \
24 perl -p -e "s/\[\[REVISION\]\]/$current/g" > \
25 "$dockerdir"/Dockerfile_test_appimage.gen
26
27 "$dockerdir"/build.sh appimage
28
29 sudo docker build -f "$dockerdir"/Dockerfile_test_appimage.gen "$dockerdir"