mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 19:28:25 +00:00
Checked while asking whether the amethyst-nostr cask's review feedback applied
to the two formulae. It does not — but running homebrew-core's own linter over
them turned up a real defect neither had been checked for.
**The style violation, in both files.** `brew style` flags
Homebrew/FormulaPathMethods: Use formula_opt_prefix("openjdk")
instead of Formula["openjdk"].opt_prefix
on the `write_env_script` line. Fixed in `amy.rb` and `geode.rb`; both now
report no offenses. It would have been raised on submission.
**A duplicated sentence.** amy.rb opened with "Reference Homebrew formula for
`amy`, the Amethyst CLI." twice, once on line 1 and again on line 3.
**Why they must NOT be made to match the cask.** The cask lost its `livecheck`
block and inline comments on review, so the obvious next step is to do the same
here. That would be wrong, and the header now says so with the evidence:
homebrew-cask and homebrew-core differ. Sampling the live core tap, 127 of 300
formulae with GitHub-release URLs declare `livecheck` (62 using
`:github_latest`), and 109 of 200 carry indented inline comments. `livecheck`
is load-bearing in core — it is what lets BrewTestBot open version-bump PRs, so
stripping it would disable exactly the automation the block exists for.
**geode cannot be submitted under that name.** homebrew-core's
`formula_renames.json` maps "geode" -> "apache-geode", so the token is
permanently reserved and `brew info --formula geode` resolves to Apache Geode.
Submitting needs a different token (`geode-relay`, `amethyst-geode`) plus a
matching change to bump-homebrew-geode-formula.yml. Recorded as a blocker in
the header rather than discovered at PR time.
**amy is unblocked but not ready.** The one-open-AI-PR limit that gated it is
cleared now the cask has merged; the ~70 MB bundle from `:commons` pulling
Compose/Skiko onto the CLI classpath is still the likely review objection, and
`brew audit --new --formula` has not been run end to end.
Verified the enlarged headers cannot confuse the bump workflows: both anchor on
`^ url ` / `^ sha256 ` at a two-space indent, each matches exactly once, and
replaying their `sed` changes those two lines only. `ruby -c` passes on both.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gs2gi3sZfQ7SHrVm2njLMw
66 lines
3.1 KiB
Ruby
66 lines
3.1 KiB
Ruby
# Reference Homebrew formula for `amy`, the Amethyst CLI.
|
|
#
|
|
# Submit this to Homebrew/homebrew-core (new-formula PR) or drop it into a
|
|
# personal tap (`Formula/amy.rb`) for an instant `brew install <tap>/amy`.
|
|
#
|
|
# The url + sha256 below are kept in sync automatically on every stable release
|
|
# by .github/workflows/bump-homebrew-formula.yml (it downloads the published
|
|
# `amy-<version>-jvm.tar.gz`, recomputes the sha256, and opens a PR). To refresh
|
|
# by hand instead:
|
|
# curl -fsSL -o amy-jvm.tar.gz \
|
|
# https://github.com/vitorpamplona/amethyst/releases/download/vX.Y.Z/amy-X.Y.Z-jvm.tar.gz
|
|
# shasum -a 256 amy-jvm.tar.gz
|
|
#
|
|
# Why a pre-built jar bundle instead of building from source:
|
|
# homebrew-core builds inside a network sandbox, so a Gradle build cannot
|
|
# resolve its Maven dependencies there. The accepted pattern for JVM tools is
|
|
# to download a pre-built, no-JRE jar bundle and depend on the system openjdk.
|
|
# We publish exactly that as `amy-<version>-jvm.tar.gz` (bin/amy + lib/*.jar,
|
|
# no bundled runtime) from .github/workflows/create-release.yml.
|
|
#
|
|
# Submission status (2026-08-24): NOT yet submitted. The `amethyst-nostr` cask
|
|
# is live in Homebrew/homebrew-cask, and Homebrew allows a non-maintainer only
|
|
# ONE open AI-assisted pull request at a time, so that had to merge first — it
|
|
# has. Two things to settle before opening this one:
|
|
# * The bundle is ~70 MB because `:commons` drags Compose/Skiko onto the CLI
|
|
# classpath. homebrew-core reviewers do question payload size; a
|
|
# commons core/ui split would shrink it and smooth review.
|
|
# * `brew audit --new --formula` has not been run end to end (it needs the
|
|
# published tarball). `brew style` is clean as of this commit.
|
|
#
|
|
# Do NOT "simplify" this formula to match `desktopApp/packaging/homebrew/
|
|
# amethyst-nostr.rb`. That cask had its `livecheck` block and inline comments
|
|
# stripped on review, but homebrew-CASK and homebrew-CORE differ here: in a
|
|
# sample of 300 core formulae with GitHub-release URLs, 127 declare `livecheck`
|
|
# (62 with `:github_latest`), and 109 of 200 carry indented inline comments.
|
|
# The `livecheck` below is load-bearing — it is what lets BrewTestBot open the
|
|
# version-bump PRs.
|
|
class Amy < Formula
|
|
desc "Nostr client from the Amethyst project"
|
|
homepage "https://github.com/vitorpamplona/amethyst"
|
|
url "https://github.com/vitorpamplona/amethyst/releases/download/v1.14.0/amy-1.14.0-jvm.tar.gz"
|
|
sha256 "284a8dbbead65db09d27b94b3575daa3d645826a037546fda91297561160fb5b"
|
|
license "MIT"
|
|
|
|
# Lets homebrew-core's BrewTestBot auto-open version-bump PRs when a new
|
|
# stable GitHub release appears.
|
|
livecheck do
|
|
url :stable
|
|
strategy :github_latest
|
|
end
|
|
|
|
depends_on "openjdk"
|
|
|
|
def install
|
|
# Tarball top level is bin/ and lib/ (the Gradle installDist layout).
|
|
libexec.install Dir["*"]
|
|
# Wrapper on PATH that pins JAVA_HOME to Homebrew's openjdk so amy runs
|
|
# regardless of the user's own Java setup.
|
|
(bin/"amy").write_env_script libexec/"bin/amy", JAVA_HOME: formula_opt_prefix("openjdk")
|
|
end
|
|
|
|
test do
|
|
assert_match "Amethyst command-line interface", shell_output("#{bin}/amy --help 2>&1")
|
|
end
|
|
end
|