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