Skip to content

Commit ad58f77

Browse files
authored
Checkout smithy-go on PRs at the commit pointed out by SMITHY_GO_CODEGEN_VERSION (#3509)
* Checkout smithy-go on PRs at the commit pointed out by SMITHY_GO_CODEGEN_VERSION * Strip any extra newline
1 parent c002860 commit ad58f77

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ci-find-smithy-go.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,12 @@ while [ -n "$branch" ] && [[ "$branch" == *-* ]]; do
5454
done
5555

5656
if [ -z "$matched_branch" ]; then
57-
# default to main but don't modreplace so we can use release but codegen ci
58-
# still works
57+
# default to SMITHY_GO_CODEGEN_VERSION so CI uses the same smithy-go as prod
58+
# strip any trailing whitespace/newlines that editors may add to the file
59+
codegen_version=$(tr -d '[:space:]' < SMITHY_GO_CODEGEN_VERSION)
60+
echo "no matching branch, checking out smithy-go at SMITHY_GO_CODEGEN_VERSION=${codegen_version}"
5961
git clone "$repository" "$RUNNER_TMPDIR"/smithy-go
62+
git -C "$RUNNER_TMPDIR"/smithy-go checkout "$codegen_version"
6063
exit 0
6164
fi
6265

0 commit comments

Comments
 (0)