From 4e2a5b1f0c86cfb4325717e6b6e63493d3a16d91 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Halili Date: Mon, 25 Sep 2023 15:58:53 +0000 Subject: [PATCH] ci(gitlab-cicd): try running it under bash subshell Signed-off-by: Andrei Jiroh Halili --- bin/deploykit-pages.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/deploykit-pages.sh b/bin/deploykit-pages.sh index 53caf0b..9b7a14d 100755 --- a/bin/deploykit-pages.sh +++ b/bin/deploykit-pages.sh @@ -14,7 +14,7 @@ fi _branch_name_git=$(git rev-parse --abbrev-ref HEAD) _commit_sha=$(git rev-parse HEAD) _commit_sha_short=$(git rev-parse --short HEAD) -_command_prefix="npx wrangler pages publish $_root_directory_git/public --project-name $CF_PAGES_PROJECT_NAME --branch $_branch_name_git --commit-hash $_commit_sha" +_command_prefix="npx wrangler pages publish ${_root_directory_git}/public --project-name ${CF_PAGES_PROJECT_NAME} --branch ${_branch_name_git} --commit-hash ${_commit_sha}" warn() { echo "warning: $*" @@ -31,7 +31,7 @@ info() { if [[ $_branch_name_git == "main" ]]; then DEPLOY_COMMAND="$_command_prefix --env production" elif [[ $CI_PIPELINE_SOURCE == "merge_request" ]]; then - DEPLOY_COMMAND="$_command_prefix --env pr-#CI_MERGE_REQUEST_ID" + DEPLOY_COMMAND="$_command_prefix --env pr-$CI_MERGE_REQUEST_ID" fi if ! git diff-index --quiet HEAD -- && [[ $FF_DIRTY_DEPLOY != "true" ]]; then @@ -46,9 +46,9 @@ if [[ ! -d "$_root_directory_git/public" ]]; then fi if [[ $FF_DIRTY_DEPLOY == "true" ]]; then - $DEPLOY_COMMAND --commit-dirty + bash $DEPLOY_COMMAND --commit-dirty else - ${DEPLOY_COMMAND:-"$_command_prefix"} + bash ${DEPLOY_COMMAND:-"$_command_prefix"} fi if [[ $_branch_name_git == "main" ]]; then