comparison dockerbuild.sh @ 109:471142e74a1a

Merge
author Chris Cannam
date Tue, 12 Feb 2019 11:27:14 +0000
parents 76badb3a0bb3
children 169e04e81ea0
comparison
equal deleted inserted replaced
108:efff8e5d90a3 109:471142e74a1a
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 "WARNING: Current working copy has been modified - build will check out the last commit, which must perforce be different";;
11 *);;
12 esac
13
14 current=${current%%+}
15
16 rm -f vampy.so
17
18 cat Dockerfile.in | perl -p -e 's/\[\[REVISION\]\]/'"$current"'/' > Dockerfile
19
20 dockertag="cannam/vampy-$current"
21
22 sudo docker build -t "$dockertag" -f Dockerfile .
23
24 container=$(sudo docker create "$dockertag")
25 sudo docker cp "$container":vampy/vampy.so .
26 sudo docker rm "$container"
27
28 ldd vampy.so
29 VAMP_PATH=".:./Example VamPy plugins" ../vamp-plugin-sdk/host/vamp-simple-host -l
30
31 echo "Done!"
32