Skip to content

Commit

Permalink
Fix NO_CACHE by default for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sickcodes committed Apr 12, 2021
1 parent 43666a0 commit e2d69c2
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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}" \
Expand All @@ -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 \
Expand All @@ -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}" \
Expand All @@ -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 \
Expand All @@ -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' \
Expand Down

0 comments on commit e2d69c2

Please sign in to comment.