diff --git a/deploy/build-all.sh b/deploy/build-all.sh deleted file mode 120000 index 681ade2..0000000 --- a/deploy/build-all.sh +++ /dev/null @@ -1 +0,0 @@ -build-quick.sh \ No newline at end of file diff --git a/deploy/build-all.sh b/deploy/build-all.sh new file mode 100755 index 0000000..557b11a --- /dev/null +++ b/deploy/build-all.sh @@ -0,0 +1,41 @@ +#!/bin/bash -e + +# macOS does not support readlink -f, so we use greadlink instead +if [[ `uname` == 'Darwin' ]]; then + command -v greadlink 2>/dev/null 2>&1 || { echo >&2 "Install greadlink using brew."; exit 1; } + readlink='greadlink' +else + readlink='readlink' +fi +ROOT="$(dirname "$(dirname "$($readlink -f "$0")")")" + +case "$(basename "$0")" in + build-pull.sh) + docker pull armadillica/pillar_py:3.6 + docker pull armadillica/pillar_wheelbuilder:latest + pushd "$ROOT/docker/3_buildwheels" + ./build.sh + popd + ;& + build-quick.sh) + pushd "$ROOT/docker/4_run" + ./build.sh + ;; + build-all.sh) + pushd "$ROOT/docker" + ./full_rebuild.sh + ;; + *) + echo "Unknown script $0, aborting" >&2 + exit 1 +esac + +popd +echo +echo "Press [ENTER] to push the new Docker images." +read dummy +docker push armadillica/pillar_py:3.6 +docker push armadillica/pillar_wheelbuilder:latest +docker push armadillica/blender_cloud:latest +echo +echo "Build is done, ready to update the server." diff --git a/deploy/build-pull.sh b/deploy/build-pull.sh new file mode 120000 index 0000000..681ade2 --- /dev/null +++ b/deploy/build-pull.sh @@ -0,0 +1 @@ +build-quick.sh \ No newline at end of file diff --git a/deploy/build-quick.sh b/deploy/build-quick.sh deleted file mode 100755 index 54f421d..0000000 --- a/deploy/build-quick.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -e - -# macOS does not support readlink -f, so we use greadlink instead -if [[ `uname` == 'Darwin' ]]; then - command -v greadlink 2>/dev/null 2>&1 || { echo >&2 "Install greadlink using brew."; exit 1; } - readlink='greadlink' -else - readlink='readlink' -fi -ROOT="$(dirname "$(dirname "$($readlink -f "$0")")")" - -case "$(basename "$0")" in - build-quick.sh) - pushd "$ROOT/docker/4_run" - ./build.sh - ;; - build-all.sh) - pushd "$ROOT/docker" - ./full_rebuild.sh - ;; - *) - echo "Unknown script $0, aborting" >&2 - exit 1 -esac - -popd -echo -echo "Press [ENTER] to push the new Docker image." -read dummy -docker push armadillica/blender_cloud:latest -echo -echo "Build is done, ready to update the server." diff --git a/deploy/build-quick.sh b/deploy/build-quick.sh new file mode 120000 index 0000000..b415698 --- /dev/null +++ b/deploy/build-quick.sh @@ -0,0 +1 @@ +build-all.sh \ No newline at end of file diff --git a/deploy/full-all.sh b/deploy/full-all.sh index e00c958..bbf7a51 100755 --- a/deploy/full-all.sh +++ b/deploy/full-all.sh @@ -1 +1,9 @@ -./2docker.sh && ./build-all.sh && ./2server.sh cloud2 +#!/bin/bash + +set -e + +NAME="$(basename "$0")" + +./2docker.sh +./${NAME/full-/build-} +./2server.sh cloud2 diff --git a/deploy/full-pull.sh b/deploy/full-pull.sh new file mode 120000 index 0000000..6ba6114 --- /dev/null +++ b/deploy/full-pull.sh @@ -0,0 +1 @@ +full-all.sh \ No newline at end of file diff --git a/deploy/full-quick.sh b/deploy/full-quick.sh deleted file mode 100755 index 756a140..0000000 --- a/deploy/full-quick.sh +++ /dev/null @@ -1 +0,0 @@ -./2docker.sh && ./build-quick.sh && ./2server.sh cloud2 diff --git a/deploy/full-quick.sh b/deploy/full-quick.sh new file mode 120000 index 0000000..6ba6114 --- /dev/null +++ b/deploy/full-quick.sh @@ -0,0 +1 @@ +full-all.sh \ No newline at end of file diff --git a/docker/3_buildwheels/build.sh b/docker/3_buildwheels/build.sh index 6f36a8b..da0b517 100755 --- a/docker/3_buildwheels/build.sh +++ b/docker/3_buildwheels/build.sh @@ -22,7 +22,7 @@ fi echo "Wheelhouse is $WHEELHOUSE" mkdir -p "$WHEELHOUSE" -docker build -t pillar_wheelbuilder . +docker build -t armadillica/pillar_wheelbuilder:latest . GID=$(id -g) docker run --rm -i \