From dba56c92b3429b1948db6ca16ee012f3385f50ff Mon Sep 17 00:00:00 2001 From: Luis Madrigal <599908+Madrigal@users.noreply.github.com> Date: Fri, 7 Aug 2026 16:55:14 -0400 Subject: [PATCH 1/2] Checkout smithy-go on PRs at the commit pointed out by SMITHY_GO_CODEGEN_VERSION --- ci-find-smithy-go.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci-find-smithy-go.sh b/ci-find-smithy-go.sh index ce519bb6408f..0397b36197b8 100755 --- a/ci-find-smithy-go.sh +++ b/ci-find-smithy-go.sh @@ -54,9 +54,11 @@ while [ -n "$branch" ] && [[ "$branch" == *-* ]]; do done if [ -z "$matched_branch" ]; then - # default to main but don't modreplace so we can use release but codegen ci - # still works + # default to SMITHY_GO_CODEGEN_VERSION so CI uses the same smithy-go as prod + codegen_version=$(cat SMITHY_GO_CODEGEN_VERSION) + echo "no matching branch, checking out smithy-go at SMITHY_GO_CODEGEN_VERSION=${codegen_version}" git clone "$repository" "$RUNNER_TMPDIR"/smithy-go + git -C "$RUNNER_TMPDIR"/smithy-go checkout "$codegen_version" exit 0 fi From 382b06173da31b4069551ae504e523fcf7a8646b Mon Sep 17 00:00:00 2001 From: Luis Madrigal <599908+Madrigal@users.noreply.github.com> Date: Fri, 7 Aug 2026 17:04:41 -0400 Subject: [PATCH 2/2] Strip any extra newline --- ci-find-smithy-go.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-find-smithy-go.sh b/ci-find-smithy-go.sh index 0397b36197b8..6357fca84e64 100755 --- a/ci-find-smithy-go.sh +++ b/ci-find-smithy-go.sh @@ -55,7 +55,8 @@ done if [ -z "$matched_branch" ]; then # default to SMITHY_GO_CODEGEN_VERSION so CI uses the same smithy-go as prod - codegen_version=$(cat SMITHY_GO_CODEGEN_VERSION) + # strip any trailing whitespace/newlines that editors may add to the file + codegen_version=$(tr -d '[:space:]' < SMITHY_GO_CODEGEN_VERSION) echo "no matching branch, checking out smithy-go at SMITHY_GO_CODEGEN_VERSION=${codegen_version}" git clone "$repository" "$RUNNER_TMPDIR"/smithy-go git -C "$RUNNER_TMPDIR"/smithy-go checkout "$codegen_version"