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.3.2", revision: "25868adcad2af584b34032ebd034c4a070baaa43" 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.3.2", shell_output("#{bin}/fj --version") end end