update build script

This commit is contained in:
2026-07-25 22:16:15 +02:00
parent 07de9d4488
commit 122f57eacc

View File

@@ -16,7 +16,7 @@ fi
# Parse arguments # Parse arguments
TARGET="master" TARGET="master"
CACHE_FLAG="" CACHE_FLAG=""
BRANCH_TARGET="" CUSTOM_BRANCH=""
for arg in "$@"; do for arg in "$@"; do
case $arg in case $arg in
@@ -27,8 +27,8 @@ for arg in "$@"; do
CACHE_FLAG="--no-cache" CACHE_FLAG="--no-cache"
;; ;;
*) *)
if [ -z "$BRANCH_TARGET" ]; then if [ -z "$CUSTOM_BRANCH" ]; then
BRANCH_TARGET=$arg CUSTOM_BRANCH=$arg
fi fi
;; ;;
esac esac
@@ -43,7 +43,10 @@ fi
# Set Image name and branch defaults # Set Image name and branch defaults
IMAGE_NAME="f0ckm" 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) ---" echo "--- PRODUCTION DEPLOYMENT (master) ---"
BRANCH_TARGET="master" BRANCH_TARGET="master"
elif [ "$TARGET" == "stg" ]; then elif [ "$TARGET" == "stg" ]; then