From d5f2d711aa02638465f98e58ff2ad8703aa83820 Mon Sep 17 00:00:00 2001 From: Luc Talatinian Date: Thu, 17 Aug 2023 10:40:34 -0400 Subject: [PATCH] print the branch --- ci-find-smithy-go.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci-find-smithy-go.sh b/ci-find-smithy-go.sh index 8c119a5758f..1807e9059cd 100755 --- a/ci-find-smithy-go.sh +++ b/ci-find-smithy-go.sh @@ -23,6 +23,10 @@ if [ "$branch" == main ]; then echo aws-sdk-go-v2 is on branch main, stop exit 0 fi +if [ -z "$branch" ]; then + echo current branch is blank? + exit 1 +fi if [ -n "$GIT_PAT" ]; then repository=https://$GIT_PAT@github.com/$SMITHY_GO_REPOSITORY @@ -30,6 +34,7 @@ else repository=https://github.com/$SMITHY_GO_REPOSITORY fi +echo on branch \"$branch\" while [ -n "$branch" ] && [[ "$branch" == *-* ]]; do echo looking for $branch... git ls-remote --exit-code --heads $repository refs/heads/$branch