From 8ec61bf3523a2123687d5d103064fdda37bb8398 Mon Sep 17 00:00:00 2001 From: Lars Gohlke Date: Wed, 23 Oct 2024 14:17:26 +0200 Subject: [PATCH] fix current branch --- tools/terraform.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/terraform.sh b/tools/terraform.sh index 289f818..ecc08d0 100644 --- a/tools/terraform.sh +++ b/tools/terraform.sh @@ -133,7 +133,8 @@ function tf_plan { # shellcheck disable=SC2155 export CI_COMMIT_REF_NAME=$(git branch --show-current) # shellcheck disable=SC2155 - local remote=$(git config get branch.main.remote) + # shellcheck disable=SC2046 + local remote=$(git config get branch.$(git branch --show-current).remote) # shellcheck disable=SC2155 export CI_PROJECT_URL=$(git remote get-url "$remote" | sed -e 's|.*@ssh.||; s|:|/|; s|^|https://|; s|.git$||') # shellcheck disable=SC2155