class Fj < Formula desc "Forgejo/Gitea CLI tool - like gh for GitHub, but for Forgejo and Gitea" homepage "https://forgejo.zerova.net/public/fj" license "MIT" url "ssh://git@forgejo.zerova.net/public/fj.git", tag: "v0.4.0", revision: "0069198ca6cc9aa30717fb2519e3d34b3bbd70db" head "ssh://git@forgejo.zerova.net/public/fj.git", branch: "main" depends_on "go" => :build def install ldflags = "-s -w" system "go", "build", *std_go_args(ldflags:) generate_completions_from_executable(bin/"fj", "completion") # Generate man pages mkdir "man" do system bin/"fj", "manpages", "--dir", "." man1.install Dir["*.1"] end end test do assert_match "0.4.0", shell_output("#{bin}/fj --version") end end