Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions scripts/generate-clients/build-smithy-typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ const buildSmithyTypeScript = async (repo, commit) => {
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 });
// Checkout commit (connect to remote only when necessary)
try {
await spawnProcess("git", ["cat-file", "-e", commit], { cwd: repo });
} catch (error) {
await spawnProcess("git", ["fetch", "origin", commit, "--depth=1"], { cwd: repo });
}

// Switch to branch with commit
const tempBranchName = `temp-${commit}`;
Expand Down
Loading