mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
feat(cli): publish no-JRE jar bundle + Homebrew-core formula for amy
Enable distributing the `amy` CLI via Homebrew-core (mainline formulae). Homebrew-core builds in a network-sandboxed env, so a from-source Gradle build can't resolve Maven deps there; the accepted pattern for JVM tools is a pre-built no-JRE jar bundle + `depends_on "openjdk"`. installDist already produces exactly that (bin/amy + lib/*.jar, no bundled runtime). - create-release.yml: publish `amy-<version>-jvm.tar.gz` (the installDist tree) as a release asset on the linux leg. Pure JVM bytecode, so one platform-independent artifact serves every OS. - packaging/homebrew/amy.rb: reference formula (depends_on openjdk, livecheck for BrewTestBot auto-bumps, `amy --help` smoke test). Not consumed by any build here — it's the artifact to submit to Homebrew/homebrew-core. - BUILDING.md: homebrew-core submission runbook; note that the desktop app is already on mainline Homebrew (homebrew/cask); document name-collision and pre-built-jar review caveats. - asset-name.sh: document the jvm bundle naming exception. Verified locally: :cli:installDist builds with only a JDK (no Android SDK), and the extracted bundle runs via JAVA_HOME (`amy --help` exits 0). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015sso31DfSF9B6EFCVkEqWD
This commit is contained in:
@@ -321,6 +321,23 @@ jobs:
|
||||
source scripts/asset-name.sh
|
||||
collect_cli_assets "${{ matrix.family }}" "${{ matrix.arch }}" "${{ steps.ver.outputs.version }}" dist
|
||||
|
||||
# Homebrew-core ships a no-JRE jar bundle and depends_on "openjdk" — it
|
||||
# cannot use the jlink tarball above (bundled runtime) nor build from
|
||||
# source (its sandbox blocks Gradle's Maven downloads). installDist
|
||||
# (bin/amy + lib/*.jar, no runtime/) is exactly that bundle. It is pure
|
||||
# JVM bytecode, so one platform-independent asset serves every OS; we cut
|
||||
# it on the linux leg only. amyImage depends on installDist, so the
|
||||
# cli/build/install/amy tree already exists here.
|
||||
- name: Package no-JRE jvm bundle for Homebrew (linux leg only)
|
||||
if: matrix.family == 'linux'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VER="${{ steps.ver.outputs.version }}"
|
||||
SRC="cli/build/install/amy"
|
||||
test -x "$SRC/bin/amy"
|
||||
( cd "$SRC" && tar czf "$OLDPWD/dist/amy-${VER}-jvm.tar.gz" bin lib )
|
||||
echo "Collected: dist/amy-${VER}-jvm.tar.gz"
|
||||
|
||||
- name: Enforce CLI size budget (200 MB per asset)
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
Reference in New Issue
Block a user