Skip to content

Commit

Permalink
Add macos-totp-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
moonfruit committed Oct 24, 2023
1 parent bf06e64 commit 733fa02
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Formula/macos-totp-cli.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class MacosTotpCli < Formula
desc "Simple TOTP CLI, powered by keychain of macOS"
homepage "https://github.com/simnalamburt/macos-totp-cli"
url "https://github.com/simnalamburt/macos-totp-cli/archive/refs/tags/v1.0.0.tar.gz"
sha256 "afb947ac9b0cb227a302e81f6faf1f9c8bbadc169bba2445d9104cbb7200eeb2"
license any_of: ["Apache-2.0", "MIT"]

depends_on "go" => :build

def install
system "go", "build", *std_go_args(ldflags: "-s -w"), "-o", "totp"
bin.install "totp"
ENV["PATH"] = "#{bin}:#{ENV["PATH"]}"
generate_completions_from_executable("totp", "completion", base_name: "totp")
end

test do
system "#{bin}/totp", "--version"
end
end

0 comments on commit 733fa02

Please sign in to comment.