Fix NO_CACHE by default for testing

This commit is contained in:
sickcodes 2021-04-12 09:16:44 +00:00
parent 43666a0d5e
commit e2d69c2bb5

View File

@ -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' \