chore: simplify logic for flags without multiple methods of being set
This commit is contained in:
1 file changed
+8
-22
@@ -49,11 +49,7 @@ trigger-builder-railpack-builder-build() {
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--platform=*)
|
--platform=*)
|
||||||
if [[ "$1" == "--buildpack=*" ]]; then
|
RAILPACK_ARGS+=("--platform" "${1#--platform=}")
|
||||||
RAILPACK_ARGS+=("--platform" "${1#--platform=}")
|
|
||||||
elif [[ "$1" == "--platform=*" ]]; then
|
|
||||||
RAILPACK_ARGS+=("--platform" "${1#--platform=}")
|
|
||||||
fi
|
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
--progress)
|
--progress)
|
||||||
@@ -62,9 +58,7 @@ trigger-builder-railpack-builder-build() {
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--progress=*)
|
--progress=*)
|
||||||
if [[ "$1" == "--progress=*" ]]; then
|
RAILPACK_ARGS+=("--progress" "${1#--progress=}")
|
||||||
RAILPACK_ARGS+=("--progress" "${1#--progress=}")
|
|
||||||
fi
|
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
--cache-key)
|
--cache-key)
|
||||||
@@ -73,9 +67,7 @@ trigger-builder-railpack-builder-build() {
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--cache-key=*)
|
--cache-key=*)
|
||||||
if [[ "$1" == "--cache-key=*" ]]; then
|
RAILPACK_ARGS+=("--cache-key" "${1#--cache-key=}")
|
||||||
RAILPACK_ARGS+=("--cache-key" "${1#--cache-key=}")
|
|
||||||
fi
|
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
-e | --env)
|
-e | --env)
|
||||||
@@ -86,8 +78,8 @@ trigger-builder-railpack-builder-build() {
|
|||||||
-e=* | --env=*)
|
-e=* | --env=*)
|
||||||
if [[ "$1" == "--env=*" ]]; then
|
if [[ "$1" == "--env=*" ]]; then
|
||||||
RAILPACK_ARGS+=("--env" "${1#--env=}")
|
RAILPACK_ARGS+=("--env" "${1#--env=}")
|
||||||
elif [[ "$1" == "--env=*" ]]; then
|
elif [[ "$1" == "--e=*" ]]; then
|
||||||
RAILPACK_ARGS+=("--env" "${1#--env=}")
|
RAILPACK_ARGS+=("--env" "${1#-e=}")
|
||||||
fi
|
fi
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
@@ -97,9 +89,7 @@ trigger-builder-railpack-builder-build() {
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--previous=*)
|
--previous=*)
|
||||||
if [[ "$1" == "--previous=*" ]]; then
|
RAILPACK_ARGS+=("--previous" "${1#--previous=}")
|
||||||
RAILPACK_ARGS+=("--previous" "${1#--previous=}")
|
|
||||||
fi
|
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
--build-cmd)
|
--build-cmd)
|
||||||
@@ -108,9 +98,7 @@ trigger-builder-railpack-builder-build() {
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--build-cmd=*)
|
--build-cmd=*)
|
||||||
if [[ "$1" == "--build-cmd=*" ]]; then
|
RAILPACK_ARGS+=("--build-cmd" "${1#--build-cmd=}")
|
||||||
RAILPACK_ARGS+=("--build-cmd" "${1#--build-cmd=}")
|
|
||||||
fi
|
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
--start-cmd)
|
--start-cmd)
|
||||||
@@ -119,9 +107,7 @@ trigger-builder-railpack-builder-build() {
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
--start-cmd=*)
|
--start-cmd=*)
|
||||||
if [[ "$1" == "--start-cmd=*" ]]; then
|
RAILPACK_ARGS+=("--start-cmd" "${1#--start-cmd=}")
|
||||||
RAILPACK_ARGS+=("--start-cmd" "${1#--start-cmd=}")
|
|
||||||
fi
|
|
||||||
shift 1
|
shift 1
|
||||||
;;
|
;;
|
||||||
---show-plan | --error-missing-start)
|
---show-plan | --error-missing-start)
|
||||||
|
|||||||
Reference in new issue
Block a user