annotate Resources/Builders/MinGW32-Python2.7/docker-compile.sh @ 112:b3a18e333f93

integration 4.0->mainline
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 28 Mar 2023 17:28:16 +0200
parents 6f639ddfc4bc
children 3678a028f1f6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 #!/bin/bash
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 set -ex
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 if [ "$1" != "Debug" -a "$1" != "Release" ]; then
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 echo "Please provide build type: Debug or Release"
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 exit -1
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 fi
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 if [ -t 1 ]; then
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 # TTY is available => use interactive mode
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 DOCKER_FLAGS='-i'
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 fi
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 ROOT_DIR=`dirname $(readlink -f $0)`/../../..
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 mkdir -p ${ROOT_DIR}/docker-build/
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
10
6f639ddfc4bc fix mingw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 9
diff changeset
19 ( cd ${ROOT_DIR}/Resources/Builders/ && \
6f639ddfc4bc fix mingw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 9
diff changeset
20 docker build \
6f639ddfc4bc fix mingw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 9
diff changeset
21 -f ./Dockerfile-MinGW-BuildEnvironment \
6f639ddfc4bc fix mingw
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 9
diff changeset
22 -t mingw-python-build . )
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 docker run -t ${DOCKER_FLAGS} --rm \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 --user $(id -u):$(id -g) \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 -v ${ROOT_DIR}:/source:ro \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 -v ${ROOT_DIR}/docker-build:/target:rw \
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 mingw-python-build \
9
8ec973ae8d6c fix docker builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 0
diff changeset
29 bash /source/Resources/Builders/MinGW32-Python2.7/docker-internal.sh $1
0
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30
7ed502b17b8f initial commit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 ls -lR ${ROOT_DIR}/docker-build/