diff --git a/build.bash b/build.bash index 03cc9aa..f186e90 100644 --- a/build.bash +++ b/build.bash @@ -16,7 +16,7 @@ fi # Parse arguments TARGET="master" CACHE_FLAG="" -BRANCH_TARGET="" +CUSTOM_BRANCH="" for arg in "$@"; do case $arg in @@ -27,8 +27,8 @@ for arg in "$@"; do CACHE_FLAG="--no-cache" ;; *) - if [ -z "$BRANCH_TARGET" ]; then - BRANCH_TARGET=$arg + if [ -z "$CUSTOM_BRANCH" ]; then + CUSTOM_BRANCH=$arg fi ;; esac @@ -43,7 +43,10 @@ fi # Set Image name and branch defaults IMAGE_NAME="f0ckm" -if [ "$TARGET" == "master" ]; then +if [ -n "$CUSTOM_BRANCH" ]; then + BRANCH_TARGET="$CUSTOM_BRANCH" + echo "--- CUSTOM BRANCH DEPLOYMENT (${BRANCH_TARGET}) ---" +elif [ "$TARGET" == "master" ]; then echo "--- PRODUCTION DEPLOYMENT (master) ---" BRANCH_TARGET="master" elif [ "$TARGET" == "stg" ]; then