aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorsickcodes <[email protected]>2021-04-12 09:16:44 +0000
committersickcodes <[email protected]>2021-04-12 09:16:44 +0000
commite2d69c2bb5d08bb73b828e20db1f705533da6f13 (patch)
tree00d8b2af43cba7ccc7a9fd65fec26a05830625ce /tests
parentMerge pull request #235 from kaoudis/master (diff)
downloaddocker-osx-e2d69c2bb5d08bb73b828e20db1f705533da6f13.tar.xz
docker-osx-e2d69c2bb5d08bb73b828e20db1f705533da6f13.zip
Fix NO_CACHE by default for testing
Diffstat (limited to 'tests')
-rw-r--r--tests/test.sh23
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/test.sh b/tests/test.sh
index 8323c5c..2218921 100644
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -26,13 +26,13 @@ General options:
--vnc-password, -v <string> Choose a VNC passwd.
Flags
+ --no-cache, -n Enable --no-cache (default already)
--no-no-cache, -nn Disable --no-cache docker builds
--help, -h, help Display this help and exit
"
# set -xeuf -o pipefail
-NO_CACHE='--no-cache'
# gather arguments
while (( "$#" )); do
@@ -96,6 +96,10 @@ while (( "$#" )); do
shift
shift
;;
+ --no-cache | -n )
+ export NO_CACHE='--no-cache'
+ shift
+ ;;
--no-no-cache | -nn )
export NO_CACHE=
shift
@@ -112,6 +116,8 @@ BRANCH="${BRANCH:=master}"
REPO="${REPO:=https://github.com/sickcodes/Docker-OSX.git}"
VNC_PASSWORD="${VNC_PASSWORD:=testing}"
MIRROR_COUNTRY="${MIRROR_COUNTRY:=US}"
+NO_CACHE="${NO_CACHE:=--no-cache}"
+
TEST_BUILDS=(
'docker-osx:latest'
@@ -195,8 +201,7 @@ clone_repo () {
docker-osx:latest () {
- docker build \
- "${NO_CACHE}" \
+ docker build ${NO_CACHE} \
--build-arg BRANCH="${BRANCH}" \
--build-arg RANKMIRRORS=true \
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
@@ -207,8 +212,7 @@ docker-osx:latest () {
docker-osx:naked () {
- docker build \
- "${NO_CACHE}" \
+ docker build ${NO_CACHE} \
--build-arg RANKMIRRORS=true \
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
-f ./Dockerfile.naked \
@@ -218,8 +222,7 @@ docker-osx:naked () {
docker-osx:big-sur () {
- docker build \
- "${NO_CACHE}" \
+ docker build ${NO_CACHE} \
--build-arg VERSION=11 \
--build-arg RANKMIRRORS=true \
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
@@ -229,8 +232,7 @@ docker-osx:big-sur () {
}
docker-osx:auto () {
- docker build \
- "${NO_CACHE}" \
+ docker build ${NO_CACHE} \
--build-arg RANKMIRRORS=true \
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
-f ./Dockerfile.auto \
@@ -239,8 +241,7 @@ docker-osx:auto () {
}
docker-osx:auto-big-sur () {
- docker build \
- "${NO_CACHE}" \
+ docker build ${NO_CACHE} \
--build-arg RANKMIRRORS=true \
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
--build-arg IMAGE_URL='https://images.sick.codes/mac_hdd_ng_auto_big_sur.img' \