Skip to content

Commit 9b6655a

Browse files
authored
fix(scripts): git fetch origin provided commit in codegen (#5159)
1 parent fa8ecad commit 9b6655a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

scripts/generate-clients/build-smithy-typescript.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ const buildSmithyTypeScript = async (repo, commit) => {
1010
await access(repo);
1111
} catch (error) {
1212
deleteSmithyTsRepo = true;
13-
await spawnProcess("git", ["clone", "https://github.com/awslabs/smithy-typescript.git", repo]);
13+
await spawnProcess("git", ["clone", "https://github.com/awslabs/smithy-typescript.git", repo, "--depth=1"]);
1414
}
1515

1616
// Checkout commit
17+
await spawnProcess("git", ["fetch", "origin", commit, "--depth=1"], { cwd: repo });
18+
19+
// Switch to branch with commit
1720
const tempBranchName = `temp-${commit}`;
1821
await spawnProcess("git", ["checkout", "-b", tempBranchName, commit], { cwd: repo });
1922

scripts/generate-clients/config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Update this commit when taking up new changes from smithy-typescript.
22
module.exports = {
3-
SMITHY_TS_COMMIT: "d942a87",
3+
// Use full commit hash as we explcitly fetch it.
4+
SMITHY_TS_COMMIT: "d942a87081c0ca101f77b2336042773b26b0b9b1",
45
};

0 commit comments

Comments
 (0)