Skip to content

refactor(bundle): move LaunchAgent plist template into bundle/ - #19

Merged
mitchelljphayes merged 1 commit into
mainfrom
refactor/bundle-plist-template
Sep 20, 2026
Merged

mitchelljphayes merged 1 commit into
mainfrom
refactor/bundle-plist-template

Conversation

@mitchelljphayes

Copy link
Copy Markdown
Owner

Move com.mitchelljphayes.switcheroo.plist from the repository root into bundle/ so the root stays clean as the project's public face. The template now lives with the other packaging assets (AppIcon.icns, Info.plist, AppIcon-1024.png).

Why

The repo root had only one stray packaging asset — the LaunchAgent plist template — while every other packaging asset lived under bundle/. Keeping the root clean makes the public face of the repo easier to scan and groups related packaging files.

Behavior

  • install.sh (repo-checkout install) — points at bundle/com.mitchelljphayes.switcheroo.plist.
  • install-binary.sh (release-archive install) — resolves ${SCRIPT_DIR}/com.mitchelljphayes.switcheroo.plist first, falling back to bundle/. Release archives flatten bundle/ into the archive root, so the root-adjacent path is what end users hit; the bundle/ fallback preserves repo-checkout installs.
  • scripts/package.sh — copies the template from bundle/ into the archive-root payload as com.mitchelljphayes.switcheroo.plist, so the extracted archive layout and installer behavior are byte-identical to before.
  • scripts/test_lib.sh — sw_render_plist test target moves to bundle/com.mitchelljphayes.switcheroo.plist.
  • New archive smoke test in package.sh — after extracting the binary archive during self-verification, render the extracted plist with sed, validate it with plutil -lint, and confirm __APP_DIR__ substitution. Catches future archive/repo path drift.

What does not change

  • No runtime, daemon, or config behavior changes.
  • The v0.1.1 tag and the Homebrew formula are unaffected (the formula builds its own plist from bundle/Info.plist, not from this template).
  • Archive contents (binary archive layout, installer behavior) unchanged.

Validation

  • shellcheck clean on all 6 scripts (install.sh, install-binary.sh, scripts/package.sh, scripts/test_lib.sh, scripts/lib.sh, uninstall.sh).
  • test_lib 24/24 passing.
  • Full packaging rehearsal (./scripts/package.sh) succeeds, including the new archive smoke test: OK: archive installer resolves and renders plist template.
  • plutil -lint on bundle/com.mitchelljphayes.switcheroo.plist: OK.
  • Archive contents verified: plist still ships at archive root in the binary archive (extracted layout unchanged).

Root kept clean (repo's public face); the template now sits with the
other packaging assets under bundle/.

- install.sh and scripts/test_lib.sh reference bundle/com.mitchelljphayes.switcheroo.plist
  (repo-checkout layout).
- install-binary.sh resolves root-adjacent first (release archives flatten
  bundle/ to the archive root) and falls back to bundle/ for repo checkouts.
- scripts/package.sh stages the archive-root plist from bundle/, so the
  extracted archive layout and installer behavior are unchanged.
- New archive smoke test in package.sh renders the extracted plist with
  sed and validates it with plutil -lint, catching future archive/repo
  layout drift.
- No runtime, daemon, or config behavior changes. The v0.1.1 tag and the
  Homebrew formula are unaffected (formula builds its own plist).
@mitchelljphayes
mitchelljphayes merged commit 185abcd into main Sep 20, 2026
12 checks passed
@mitchelljphayes
mitchelljphayes deleted the refactor/bundle-plist-template branch September 20, 2026 20:45
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