Mercurial > hg > orthanc-stone
comparison Applications/StoneWebViewer/WebAssembly/docker-build.sh @ 1828:8bc9ba6f7518
integration StoneWebViewer-2.0->mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 27 May 2021 11:06:46 +0200 |
parents | 21ccc00839f7 |
children | 3889ae96d2e9 |
comparison
equal
deleted
inserted
replaced
1826:fa81bb6378fb | 1828:8bc9ba6f7518 |
---|---|
19 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 19 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 | 20 |
21 | 21 |
22 set -ex | 22 set -ex |
23 | 23 |
24 IMAGE=jodogne/wasm-builder:1.39.17-upstream | 24 # NB: Sources of the "jodogne/wasm-builder" Docker image: |
25 # https://github.com/jodogne/OrthancDocker/tree/master/wasm-builder | |
26 IMAGE=jodogne/wasm-builder:2.0.23 | |
25 #IMAGE=wasm-builder | 27 #IMAGE=wasm-builder |
26 | 28 |
27 if [ "$1" != "Debug" -a "$1" != "Release" ]; then | 29 if [ "$1" != "Debug" -a "$1" != "Release" ]; then |
28 echo "Please provide build type: Debug or Release" | 30 echo "Please provide build type: Debug or Release" |
29 exit -1 | 31 exit -1 |
32 fi | |
33 | |
34 if [ "$2" == "" ]; then | |
35 echo "No branch provided, trying to identify the current branch" | |
36 STONE_BRANCH=`hg identify -b` | |
37 echo "Detected branch of the Stone Web viewer: ${STONE_BRANCH}" | |
38 else | |
39 STONE_BRANCH=$2 | |
30 fi | 40 fi |
31 | 41 |
32 if [ -t 1 ]; then | 42 if [ -t 1 ]; then |
33 # TTY is available => use interactive mode | 43 # TTY is available => use interactive mode |
34 DOCKER_FLAGS='-i' | 44 DOCKER_FLAGS='-i' |
38 | 48 |
39 mkdir -p ${ROOT_DIR}/wasm-binaries | 49 mkdir -p ${ROOT_DIR}/wasm-binaries |
40 | 50 |
41 docker run -t ${DOCKER_FLAGS} --rm \ | 51 docker run -t ${DOCKER_FLAGS} --rm \ |
42 --user $(id -u):$(id -g) \ | 52 --user $(id -u):$(id -g) \ |
53 -e STONE_BRANCH=${STONE_BRANCH} \ | |
43 -v ${ROOT_DIR}:/source:ro \ | 54 -v ${ROOT_DIR}:/source:ro \ |
44 -v ${ROOT_DIR}/wasm-binaries:/target:rw ${IMAGE} \ | 55 -v ${ROOT_DIR}/wasm-binaries:/target:rw ${IMAGE} \ |
45 bash /source/Applications/StoneWebViewer/WebAssembly/docker-internal.sh $1 | 56 bash /source/Applications/StoneWebViewer/WebAssembly/docker-internal.sh $1 |
46 | 57 |
47 ls -lR ${ROOT_DIR}/wasm-binaries/StoneWebViewer/ | 58 ls -lR ${ROOT_DIR}/wasm-binaries/StoneWebViewer/ |