Merge pull request #207020 from Homebrew/bump-qpdf-11.10.0
[Homebrew/homebrew-core.git] / Formula / t / totp-cli.rb
blob9f4544002f149d8b4e6c54f84fc7412b10a522d2
1 class TotpCli < Formula
2   desc "Authy/Google Authenticator like TOTP CLI tool written in Go"
3   homepage "https://yitsushi.github.io/totp-cli/"
4   url "https://github.com/yitsushi/totp-cli/archive/refs/tags/v1.8.8.tar.gz"
5   sha256 "3fe158259b845ff5e957a2d26b290a7474b6ce63dadd52e1046f697991b3924c"
6   license "MIT"
7   head "https://github.com/yitsushi/totp-cli.git", branch: "main"
9   bottle do
10     sha256 cellar: :any_skip_relocation, arm64_sequoia: "d3fb44e2dc96600996a071d09b320d9433b86f223dd4db1d5d78a56cd77067bc"
11     sha256 cellar: :any_skip_relocation, arm64_sonoma:  "d3fb44e2dc96600996a071d09b320d9433b86f223dd4db1d5d78a56cd77067bc"
12     sha256 cellar: :any_skip_relocation, arm64_ventura: "d3fb44e2dc96600996a071d09b320d9433b86f223dd4db1d5d78a56cd77067bc"
13     sha256 cellar: :any_skip_relocation, sonoma:        "37cfcee16c239ee82285f7f68f5137d40b77277fa4b84506b50fa7b73b848d57"
14     sha256 cellar: :any_skip_relocation, ventura:       "37cfcee16c239ee82285f7f68f5137d40b77277fa4b84506b50fa7b73b848d57"
15     sha256 cellar: :any_skip_relocation, x86_64_linux:  "72045ef678c09cfe94ca044cc7ae8057bdd2a79201abc15469ef7f0e6be11ae8"
16   end
18   depends_on "go" => :build
20   def install
21     system "go", "build", *std_go_args(ldflags: "-s -w")
23     bash_completion.install "autocomplete/bash_autocomplete" => "totp-cli"
24     zsh_completion.install "autocomplete/zsh_autocomplete" => "_totp-cli"
25   end
27   test do
28     assert_match "generate", shell_output("#{bin}/totp-cli help")
29     assert_match "storage error", pipe_output("#{bin}/totp-cli list 2>&1", "")
30   end
31 end