Skip to content

feat(cli): package ccas binary via sbt-native-packager (#41)#68

Merged
Sootopolis merged 1 commit into
mainfrom
wip
Jun 1, 2026
Merged

feat(cli): package ccas binary via sbt-native-packager (#41)#68
Sootopolis merged 1 commit into
mainfrom
wip

Conversation

@Sootopolis

Copy link
Copy Markdown
Owner

Closes #41. First sub-issue of the CLI v0 epic (#40).

What

  • Add sbt-native-packager (JavaAppPackaging). sbt stage emits two launchers under target/universal/stage/bin/:
  • Compile / discoveredMainClasses pinned to those two classes so the other ZIOAppDefault apps don't leak launcher scripts.
  • New ccas.cli.Main: dispatches the first arg — serveCcasServer.run; anything else prints a placeholder to stderr and exits non-zero (the decline subcommand tree lands in CLI subcommand tree via decline #46).
  • README gains a Build section.

Verification

  • sbt compile / sbt stage clean; bin/ contains exactly ccas + ccas-server (+ .bat).
  • ccas-server forwards -main ccas.server.CcasServer; ccas defaults to ccas.cli.Main.
  • bin/ccas serve against a local Postgres → /health and /health/ready both 200, clean SIGTERM.
  • bin/ccas <other> and bin/ccas (no args) → exit 1.

Notes

🤖 Generated with Claude Code

Add sbt-native-packager (JavaAppPackaging) and a single `ccas.cli.Main`
entry point. `sbt stage` emits two launchers under
target/universal/stage/bin: `ccas` (CLI primary) and `ccas-server`
(forwarder to ccas.server.CcasServer) for hosted deploys.
discoveredMainClasses is pinned to those two so the other ZIOAppDefault
apps don't leak launcher scripts.

Main dispatches on the first arg: `serve` boots CcasServer; anything else
prints a placeholder and exits non-zero (subcommand tree lands in #46).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Sootopolis Sootopolis merged commit 676da8b into main Jun 1, 2026
1 check passed
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.

Packaging via sbt-native-packager

1 participant