From 2b32bfd3cd0a25c8c5081897e9308419cf580cd7 Mon Sep 17 00:00:00 2001 From: Brandon Olin Date: Wed, 31 Aug 2022 15:20:12 -0700 Subject: [PATCH 1/3] use eval for build args --- src/scripts/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/build.sh b/src/scripts/build.sh index e9c1ac8..252e61d 100644 --- a/src/scripts/build.sh +++ b/src/scripts/build.sh @@ -4,7 +4,7 @@ DOCKER_TAGS_ARG="" parse_tags_to_docker_arg() { # Set comma as the new delimiter for the scope of this function. - local IFS="," + local IFS="," # Split tags into an array based on IFS delimiter. read -ra tags <<< "$PARAM_TAG" @@ -47,12 +47,12 @@ if [ -n "$PARAM_CACHE_FROM" ]; then fi build_args=( - "--file=$PARAM_DOCKERFILE_PATH/$PARAM_DOCKERFILE_NAME" - "$DOCKER_TAGS_ARG" + "--file=$PARAM_DOCKERFILE_PATH/$PARAM_DOCKERFILE_NAME" + "$DOCKER_TAGS_ARG" ) if [ -n "$PARAM_EXTRA_BUILD_ARGS" ]; then - build_args+=("$PARAM_EXTRA_BUILD_ARGS") + build_args+="$(eval echo $PARAM_EXTRA_BUILD_ARGS")" fi if [ -n "$PARAM_CACHE_FROM" ]; then From 7842d7992b66f56db7ab05d48abed7947003164d Mon Sep 17 00:00:00 2001 From: Brandon Olin Date: Wed, 31 Aug 2022 15:26:14 -0700 Subject: [PATCH 2/3] remove extra quote --- src/scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/build.sh b/src/scripts/build.sh index 252e61d..d19205c 100644 --- a/src/scripts/build.sh +++ b/src/scripts/build.sh @@ -52,7 +52,7 @@ build_args=( ) if [ -n "$PARAM_EXTRA_BUILD_ARGS" ]; then - build_args+="$(eval echo $PARAM_EXTRA_BUILD_ARGS")" + build_args+="$(eval echo $PARAM_EXTRA_BUILD_ARGS)" fi if [ -n "$PARAM_CACHE_FROM" ]; then From 36d33fefcaccfad0d11861c2e58b5d00999550b0 Mon Sep 17 00:00:00 2001 From: Eric Ribeiro Date: Fri, 2 Sep 2022 06:48:50 -0700 Subject: [PATCH 3/3] fix: syntax for appending in array --- src/scripts/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripts/build.sh b/src/scripts/build.sh index d19205c..c83fd32 100644 --- a/src/scripts/build.sh +++ b/src/scripts/build.sh @@ -52,7 +52,8 @@ build_args=( ) if [ -n "$PARAM_EXTRA_BUILD_ARGS" ]; then - build_args+="$(eval echo $PARAM_EXTRA_BUILD_ARGS)" + extra_build_args="$(eval echo "$PARAM_EXTRA_BUILD_ARGS")" + build_args+=("$extra_build_args") fi if [ -n "$PARAM_CACHE_FROM" ]; then