Skip to content

Commit

Permalink
cloudfoundry-cli 8.10.0 (new formula)
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Linnane <[email protected]>
  • Loading branch information
p-linnane committed Feb 27, 2025
1 parent db07c6b commit 80e2156
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ cloudflare-wrangler
cloudflared
cloudformation-cli
cloudformation-guard
cloudfoundry-cli
cloudfox
cloudlist
cloudprober
Expand Down
27 changes: 27 additions & 0 deletions Formula/c/cloudfoundry-cli.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
class CloudfoundryCli < Formula
desc "Official command-line client for Cloud Foundry"
homepage "https://docs.cloudfoundry.org/cf-cli"
url "https://github.com/cloudfoundry/cli/archive/refs/tags/v8.10.0.tar.gz"
sha256 "c75d401c941625275ad2d560380480e43a266ffd104f9fedb8f6d3742fe46e68"
license "Apache-2.0"
head "https://github.com/cloudfoundry/cli.git", branch: "main"

depends_on "go" => :build

def install
ldflags = %W[
-s -w
-X code.cloudfoundry.org/cli/version.binaryVersion=#{version}
-X code.cloudfoundry.org/cli/version.binarySHA=#{tap.user}
-X code.cloudfoundry.org/cli/version.binaryBuildDate=#{time.iso8601}
]
system "go", "build", *std_go_args(ldflags:, output: bin/"cf")
end

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

expected = OS.linux? ? "Request error" : "lookup brew: no such host"
assert_match expected, shell_output("#{bin}/cf login -a brew 2>&1", 1)
end
end

0 comments on commit 80e2156

Please sign in to comment.