Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Formula/g/granted.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
class Granted < Formula
desc "Easiest way to access your cloud"
homepage "https://granted.dev/"
url "https://github.com/fwdcloudsec/granted/archive/refs/tags/v0.38.0.tar.gz"
sha256 "b6e2bc8fda38f55ee4673cc0f3f762e076d2029df1d9a8552681a2aacce88721"
license "MIT"
head "https://github.com/fwdcloudsec/granted.git", branch: "main"

depends_on "go" => :build

def install
ENV["CGO_ENABLED"] = "0" if OS.linux? && Hardware::CPU.arm?

ldflags = "-s -w -X github.com/common-fate/granted/internal/build.Version=#{version}"
system "go", "build", *std_go_args(ldflags:), "./cmd/granted"
end

test do
assert_match version.to_s, shell_output("#{bin}/granted --version")

output = shell_output("#{bin}/granted auth configure 2>&1", 1)
assert_match "[✘] please provide a url argument", output
end
end
Loading