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
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