feat: add --manualExit flag to skip -quit for builds - #62
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe change adds a ChangesManual exit control
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to The change adds an opt-in build flag while preserving the default behavior, with documented tests and successful build checks; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Some build methods need to enter play mode (e.g. to run in-game validation before packaging) and can't do that from a static method while -quit is also passed to the editor. This adds a --manualExit CLI flag (default false, preserving current behavior) that skips -quit in the Unity command line; the build method is then responsible for calling EditorApplication.Exit(0) itself. Wired through as a MANUAL_EXIT env var (consistent with how other build options reach the container) and consumed by the Linux, Mac, and Windows build scripts to conditionally omit -quit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ada7490 to
a98f48e
Compare
Closes #13.
Adds a
--manualExitbuild option (defaultfalse, current behavior unchanged) that skips passing-quitto the Unity editor during the build step. Some build methods need to enter play mode from a static build method — which doesn't work if-quitis also present — to run in-game validation before packaging (exact scenario described in #13). With--manualExit, the build method is responsible for callingEditorApplication.Exit(0)itself once it's done; if it doesn't, the build will hang until it times out (documented in the flag's--helpdescription).Implementation:
--manualExitoption inbuild-options.ts.MANUAL_EXITenv var viaimage-environment-factory.ts, same mechanism as other build settings reaching the container.build.shand Windowsbuild.ps1conditionally include-quitbased on$MANUAL_EXIT/$Env:MANUAL_EXIT.Testing
build-options.test.ts(flag parses, defaults tofalse) andimage-environment-factory.test.ts(env var only appears when set).bash -nsyntax-checked both modified shell scripts.bun test— 105 pass, 0 fail.bun run build— builds clean.Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Summary by CodeRabbit
New Features
manualExitbuild option, disabled by default.Tests
--manualExitoption.