Fix NO_CACHE by default for testing

pull/245/head
sickcodes 4 years ago
parent 43666a0d5e
commit e2d69c2bb5

@ -26,13 +26,13 @@ General options:
--vnc-password, -v <string> Choose a VNC passwd. --vnc-password, -v <string> Choose a VNC passwd.
Flags Flags
--no-cache, -n Enable --no-cache (default already)
--no-no-cache, -nn Disable --no-cache docker builds --no-no-cache, -nn Disable --no-cache docker builds
--help, -h, help Display this help and exit --help, -h, help Display this help and exit
" "
# set -xeuf -o pipefail # set -xeuf -o pipefail
NO_CACHE='--no-cache'
# gather arguments # gather arguments
while (( "$#" )); do while (( "$#" )); do
@ -96,6 +96,10 @@ while (( "$#" )); do
shift shift
shift shift
;; ;;
--no-cache | -n )
export NO_CACHE='--no-cache'
shift
;;
--no-no-cache | -nn ) --no-no-cache | -nn )
export NO_CACHE= export NO_CACHE=
shift shift
@ -112,6 +116,8 @@ BRANCH="${BRANCH:=master}"
REPO="${REPO:=https://github.com/sickcodes/Docker-OSX.git}" REPO="${REPO:=https://github.com/sickcodes/Docker-OSX.git}"
VNC_PASSWORD="${VNC_PASSWORD:=testing}" VNC_PASSWORD="${VNC_PASSWORD:=testing}"
MIRROR_COUNTRY="${MIRROR_COUNTRY:=US}" MIRROR_COUNTRY="${MIRROR_COUNTRY:=US}"
NO_CACHE="${NO_CACHE:=--no-cache}"
TEST_BUILDS=( TEST_BUILDS=(
'docker-osx:latest' 'docker-osx:latest'
@ -195,8 +201,7 @@ clone_repo () {
docker-osx:latest () { docker-osx:latest () {
docker build \ docker build ${NO_CACHE} \
"${NO_CACHE}" \
--build-arg BRANCH="${BRANCH}" \ --build-arg BRANCH="${BRANCH}" \
--build-arg RANKMIRRORS=true \ --build-arg RANKMIRRORS=true \
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \ --build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
@ -207,8 +212,7 @@ docker-osx:latest () {
docker-osx:naked () { docker-osx:naked () {
docker build \ docker build ${NO_CACHE} \
"${NO_CACHE}" \
--build-arg RANKMIRRORS=true \ --build-arg RANKMIRRORS=true \
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \ --build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
-f ./Dockerfile.naked \ -f ./Dockerfile.naked \
@ -218,8 +222,7 @@ docker-osx:naked () {
docker-osx:big-sur () { docker-osx:big-sur () {
docker build \ docker build ${NO_CACHE} \
"${NO_CACHE}" \
--build-arg VERSION=11 \ --build-arg VERSION=11 \
--build-arg RANKMIRRORS=true \ --build-arg RANKMIRRORS=true \
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \ --build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
@ -229,8 +232,7 @@ docker-osx:big-sur () {
} }
docker-osx:auto () { docker-osx:auto () {
docker build \ docker build ${NO_CACHE} \
"${NO_CACHE}" \
--build-arg RANKMIRRORS=true \ --build-arg RANKMIRRORS=true \
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \ --build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
-f ./Dockerfile.auto \ -f ./Dockerfile.auto \
@ -239,8 +241,7 @@ docker-osx:auto () {
} }
docker-osx:auto-big-sur () { docker-osx:auto-big-sur () {
docker build \ docker build ${NO_CACHE} \
"${NO_CACHE}" \
--build-arg RANKMIRRORS=true \ --build-arg RANKMIRRORS=true \
--build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \ --build-arg MIRROR_COUNTRY="${MIRROR_COUNTRY}" \
--build-arg IMAGE_URL='https://images.sick.codes/mac_hdd_ng_auto_big_sur.img' \ --build-arg IMAGE_URL='https://images.sick.codes/mac_hdd_ng_auto_big_sur.img' \

Loading…
Cancel
Save