Skip to content

feat: honour --targets app on macOS for app-only builds#1248

Open
kud wants to merge 1 commit into
tw93:mainfrom
kud:feat/macos-targets-app
Open

feat: honour --targets app on macOS for app-only builds#1248
kud wants to merge 1 commit into
tw93:mainfrom
kud:feat/macos-targets-app

Conversation

@kud

@kud kud commented Jun 21, 2026

Copy link
Copy Markdown

What

On macOS, pake <url> --targets app always produced a .dmg instead of an app-only build. This makes --targets app actually build only the .app bundle, skipping the DMG packaging step.

Why

merge.ts already treats app as a valid macOS bundle target (validMacTargets = ['app', 'dmg']), but MacBuilder's constructor set buildFormat to dmg for any value that wasn't an arch — and then overwrote options.targets with it before mergeConfig could apply the app target. So the app branch in merge.ts was unreachable.

Building the DMG also mounts a volume window and adds noticeable time, which is unnecessary when you only want the .app.

How

Treat an explicit --targets app the same way --install and iterativeBuild already request the app format in the constructor.

Tests

Adds tests/unit/mac-builder-targets.test.ts: --targets app yields an app-only filename; dmg/default/arch values still resolve to DMG builds. Full suite: 174 passing.

Docs

Documents app/dmg as macOS output formats in docs/cli-usage.md and docs/cli-usage_CN.md.

@kud kud force-pushed the feat/macos-targets-app branch from d8208f5 to 13b8575 Compare June 21, 2026 11:45
@kud kud force-pushed the feat/macos-targets-app branch from 13b8575 to 1255b80 Compare June 21, 2026 11:58
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.

1 participant