diff --git a/scripts/generate-clients/build-smithy-typescript.js b/scripts/generate-clients/build-smithy-typescript.js index 8795265b4b7d..d21fb62edcb1 100644 --- a/scripts/generate-clients/build-smithy-typescript.js +++ b/scripts/generate-clients/build-smithy-typescript.js @@ -10,10 +10,13 @@ const buildSmithyTypeScript = async (repo, commit) => { await access(repo); } catch (error) { deleteSmithyTsRepo = true; - await spawnProcess("git", ["clone", "https://github.com/awslabs/smithy-typescript.git", repo]); + await spawnProcess("git", ["clone", "https://github.com/awslabs/smithy-typescript.git", repo, "--depth=1"]); } // Checkout commit + await spawnProcess("git", ["fetch", "origin", commit, "--depth=1"], { cwd: repo }); + + // Switch to branch with commit const tempBranchName = `temp-${commit}`; await spawnProcess("git", ["checkout", "-b", tempBranchName, commit], { cwd: repo }); diff --git a/scripts/generate-clients/config.js b/scripts/generate-clients/config.js index e7ac552eb5be..caea414e3d5b 100644 --- a/scripts/generate-clients/config.js +++ b/scripts/generate-clients/config.js @@ -1,4 +1,5 @@ // Update this commit when taking up new changes from smithy-typescript. module.exports = { - SMITHY_TS_COMMIT: "d942a87", + // Use full commit hash as we explcitly fetch it. + SMITHY_TS_COMMIT: "d942a87081c0ca101f77b2336042773b26b0b9b1", };