From 3bea7c0ad07cbb8a5181d27cee7cdb2257d915da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 16 Dec 2016 23:08:52 +0100 Subject: [PATCH] Make docker images use the same path as host for build --- scripts/linux/build.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/linux/build.sh b/scripts/linux/build.sh index 2d3b1f03bf..93cf26e120 100755 --- a/scripts/linux/build.sh +++ b/scripts/linux/build.sh @@ -68,35 +68,35 @@ pushd build chmod a+rwx $(pwd) chmod g+s $(pwd) # CMAKE and MAKE opts from environment - docker run -u travis -v $PARENT:/work/openrct2 -w /work/openrct2/build -i -t openrct2/openrct2:32bit-only bash -c "cmake ../ -DFORCE32=on $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS" + docker run -u travis -v $PARENT:$PARENT -w $PARENT/build -i -t openrct2/openrct2:32bit-only bash -c "cmake ../ -DFORCE32=on $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS" elif [[ $TARGET == "docker64" ]] then PARENT=$(readlink -f ../) chmod a+rwx $(pwd) chmod g+s $(pwd) # CMAKE and MAKE opts from environment - docker run -v $PARENT:/work/openrct2 -w /work/openrct2/build -i -t openrct2/openrct2:64bit-only bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS && make test ARGS=\"-V\"" + docker run -v $PARENT:$PARENT -w $PARENT/build -i -t openrct2/openrct2:64bit-only bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS && make test ARGS=\"-V\"" elif [[ $TARGET == "ubuntu_i686" ]] then PARENT=$(readlink -f ../) chmod a+rwx $(pwd) chmod g+s $(pwd) # CMAKE and MAKE opts from environment - docker run -v $PARENT:/work/openrct2 -w /work/openrct2/build -i -t openrct2/openrct2:ubuntu_i686 bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && make all testpaint install $OPENRCT_MAKE_OPTS && make test ARGS=\"-V\" && ( ./testpaint --quiet || if [[ \$? -eq 1 ]] ; then echo Allowing failed tests to pass ; else echo here ; false; fi )" + docker run -v $PARENT:$PARENT -w $PARENT/build -i -t openrct2/openrct2:ubuntu_i686 bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && make all testpaint install $OPENRCT_MAKE_OPTS && make test ARGS=\"-V\" && ( ./testpaint --quiet || if [[ \$? -eq 1 ]] ; then echo Allowing failed tests to pass ; else echo here ; false; fi )" elif [[ $TARGET == "ubuntu_amd64" ]] then PARENT=$(readlink -f ../) chmod a+rwx $(pwd) chmod g+s $(pwd) # CMAKE and MAKE opts from environment - docker run -v $PARENT:/work/openrct2 -w /work/openrct2/build -i -t openrct2/openrct2:ubuntu_amd64 bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS && make test ARGS=\"-V\"" + docker run -v $PARENT:$PARENT -w $PARENT/build -i -t openrct2/openrct2:ubuntu_amd64 bash -c "cmake ../ -DWITH_TESTS=on $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS && make test ARGS=\"-V\"" elif [[ $TARGET == "windows" ]] then PARENT=$(readlink -f ../) chmod a+rwx $(pwd) chmod g+s $(pwd) # CMAKE and MAKE opts from environment - docker run -v /usr/local/cross-tools/:/usr/local/cross-tools/ -v $PARENT:/work/openrct2 -w /work/openrct2/build -i -t openrct2/openrct2:mingw bash -c "cmake ../ $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS" + docker run -v /usr/local/cross-tools/:/usr/local/cross-tools/ -v $PARENT:$PARENT -w $PARENT/build -i -t openrct2/openrct2:mingw bash -c "cmake ../ $OPENRCT2_CMAKE_OPTS && make $OPENRCT_MAKE_OPTS" else echo "Unkown target $TARGET" exit 1