Skip to content

Commit

Permalink
ci: fix CI scripts for main branch case
Browse files Browse the repository at this point in the history
Fix the issue of failure of the CI script when the current branch is main.
This was caused by use of undeclared variable `repository`.
  • Loading branch information
nrnrk committed Feb 13, 2024
1 parent 53240e4 commit eb86a49
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ci-find-smithy-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if [ -z "$RUNNER_TMPDIR" ]; then
exit 1
fi

if [ -n "$GIT_PAT" ]; then
repository=https://$GIT_PAT@github.com/$SMITHY_GO_REPOSITORY
else
repository=https://github.com/$SMITHY_GO_REPOSITORY
fi

branch=$(git branch --show-current)
if [ "$branch" == main ]; then
echo aws-sdk-go-v2 is on branch main
Expand All @@ -31,12 +37,6 @@ if [ -z "$branch" ]; then
branch=$GITHUB_HEAD_REF
fi

if [ -n "$GIT_PAT" ]; then
repository=https://$GIT_PAT@github.com/$SMITHY_GO_REPOSITORY
else
repository=https://github.com/$SMITHY_GO_REPOSITORY
fi

echo on branch \"$branch\"
while [ -n "$branch" ] && [[ "$branch" == *-* ]]; do
echo looking for "$branch"...
Expand Down

0 comments on commit eb86a49

Please sign in to comment.