Skip to content

Conversation

@dsherret
Copy link
Member

@dsherret dsherret commented Nov 6, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 6, 2025 17:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors Windows binary patching in the release promotion process by extracting inline PowerShell commands into a dedicated TypeScript script and updating the patchver dependency.

  • Created a new dedicated script for Windows binary patching (promote_to_release_windows.ts)
  • Updated patchver dependency from version 0.2.0 to 0.3.0
  • Simplified the GitHub Actions workflow by replacing inline PowerShell with a script call

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tools/release/promote_to_release_windows.ts New script that handles Windows binary patching using patchver, replacing inline PowerShell commands
tools/release/promote_to_release.ts Updated patchver import to use version 0.3.0
.github/workflows/promote_to_release.yml Simplified workflow by replacing inline PowerShell commands with a call to the new Windows patching script

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +25 to +26
await Deno.writeFile(outputPath, output);
console.log(`Created ${outputPath}`);
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patchBinary function lacks error handling for file operations. In the existing promote_to_release.ts script, similar operations wrap file writes in try-catch blocks (lines 122-130) and exit with error messages on failure. Consider adding similar error handling here to provide clear feedback when file operations fail.

Suggested change
await Deno.writeFile(outputPath, output);
console.log(`Created ${outputPath}`);
try {
await Deno.writeFile(outputPath, output);
console.log(`Created ${outputPath}`);
} catch (err) {
console.error(`Failed to write ${outputPath}:`, err);
Deno.exit(1);
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants