Some checks are pending
ci / check (push) Waiting to run
release / build (darwin-aarch64, macos, aarch64-apple-darwin) (push) Waiting to run
release / build (darwin-x86_64, macos, x86_64-apple-darwin) (push) Waiting to run
release / build (rust:1.95-bookworm, linux-x86_64, docker, x86_64-unknown-linux-gnu) (push) Waiting to run
release / publish (push) Blocked by required conditions
Release infrastructure:
* .forgejo/workflows/release.yml: on v* tags, builds darwin-aarch64,
darwin-x86_64, linux-x86_64 tarballs, computes SHA256SUMS, uploads to
the Forgejo release, and writes a ready-to-commit fj.rb formula.
* dist/homebrew/fj.rb.tmpl + scripts/render-homebrew-formula.sh for
local rendering. Publishes into rasterandstate/homebrew-tap.
Issue + PR templates:
* .forgejo/issue_template/{bug,feature,api-gap}.md so triage isn't
guessing at the user's environment.
* .forgejo/pull_request_template.md with a fmt/clippy/test checklist
and a "what to update" surface-changes section.
README demo scaffolding:
* scripts/record-demo.sh drives asciinema through a representative
~30s session covering --version, repo view (auto-detect), issue/pr
list, api, --json-fields, browse.
* README has a commented-out asciicast embed waiting for the v0.1.0
recording.
Compatibility:
* docs/compatibility.md: tested Forgejo versions, caveats for older
Gitea (≤1.19), Forgejo-only endpoints we expose.
* `fj auth login` now probes /api/v1/version once and warns to stderr
when the server reports a pre-7.x version. Parser is pure-fn tested
(modern, old, unparseable cases).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
43 lines
1.4 KiB
Cheetah
43 lines
1.4 KiB
Cheetah
class Fj < Formula
|
|
desc "Command-line tool for Forgejo, in the spirit of gh"
|
|
homepage "https://rasterhub.com/rasterstate/fj"
|
|
version "@@VERSION@@"
|
|
license "MIT"
|
|
|
|
on_macos do
|
|
on_arm do
|
|
url "https://rasterhub.com/rasterstate/fj/releases/download/v@@VERSION@@/fj-v@@VERSION@@-darwin-aarch64.tar.gz"
|
|
sha256 "@@SHA_DARWIN_AARCH64@@"
|
|
end
|
|
on_intel do
|
|
url "https://rasterhub.com/rasterstate/fj/releases/download/v@@VERSION@@/fj-v@@VERSION@@-darwin-x86_64.tar.gz"
|
|
sha256 "@@SHA_DARWIN_X86_64@@"
|
|
end
|
|
end
|
|
|
|
on_linux do
|
|
url "https://rasterhub.com/rasterstate/fj/releases/download/v@@VERSION@@/fj-v@@VERSION@@-linux-x86_64.tar.gz"
|
|
sha256 "@@SHA_LINUX_X86_64@@"
|
|
end
|
|
|
|
def install
|
|
target = if OS.mac?
|
|
Hardware::CPU.arm? ? "darwin-aarch64" : "darwin-x86_64"
|
|
else
|
|
"linux-x86_64"
|
|
end
|
|
cd "fj-v@@VERSION@@-#{target}"
|
|
bin.install "fj"
|
|
# Optional: completions and man pages if present.
|
|
bash_completion.install "completions/fj.bash" if File.exist?("completions/fj.bash")
|
|
zsh_completion.install "completions/_fj" if File.exist?("completions/_fj")
|
|
fish_completion.install "completions/fj.fish" if File.exist?("completions/fj.fish")
|
|
man1.install Dir["man/*.1"] if Dir.exist?("man")
|
|
end
|
|
|
|
test do
|
|
assert_match "fj @@VERSION@@", shell_output("#{bin}/fj --version")
|
|
assert_match "Command-line tool for Forgejo", shell_output("#{bin}/fj --help")
|
|
end
|
|
end
|