fix: skip windows exe patching in ci mode to avoid wine dependency#645
Conversation
The server release CI workflow fails on ubuntu-latest because patch-windows-exe.ts requires Wine to run rcedit. Thread the existing --ci flag through compileServerBinaries so Windows PE metadata patching is skipped in CI mode with a warning log.
|
Greptile (@greptileai) review |
|
Claude (@claude) review |
|
Claude finished Nikhil (@shadowfax92)'s task in 1m 1s —— View job Code Review
Overall: LGTM — clean, minimal, and consistent with existing patterns. The fix is well-scoped. The
|
Greptile SummaryThis PR fixes a CI failure in Confidence Score: 5/5Safe to merge — the fix is minimal, backward-compatible, and correctly scoped to CI mode only. No P0 or P1 issues found. The change threads an existing flag through two function signatures, uses the correct log.warn API, and has no other callers that need updating. All remaining observations are at most P2. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[runProdResourceBuild] -->|args.ci| B[compileServerBinaries\noptions: ci]
B --> C[bundleServer]
C --> D{for each target}
D --> E[compileTarget\ntarget, env, ci]
E --> F{target.os === 'windows'?}
F -->|No| G[return binaryPath]
F -->|Yes| H{ci === true?}
H -->|Yes| I[log.warn\nSkipping Windows patching]
H -->|No| J[runCommand\npatch-windows-exe.ts]
I --> G
J --> G
G --> K[compiled artifacts]
Reviews (1): Last reviewed commit: "fix: skip windows exe patching in ci mod..." | Re-trigger Greptile |
Summary
release-server.yml) fails onubuntu-latestbecausepatch-windows-exe.tsrequires Wine to runrcedit-x64.exe, and Wine is not available on the CI runner--ciflag throughcompileServerBinaries→compileTargetso Windows PE metadata patching is skipped in CI mode with a warning log--cialready skips R2 uploads and production secretsChanges
scripts/build/server/compile.ts— Addedciparameter tocompileTargetand optionaloptionstocompileServerBinaries. Whenci=trueand target is Windows, logs a warning and skips patching instead of failing.scripts/build/server/orchestrator.ts— Passes{ ci: args.ci }tocompileServerBinaries.Test plan
Release BrowserOS Serverworkflow on main after merging — should pass the "Build release artifacts" stepbun run build:server:teststill works (non-CI mode, no behavior change)