Skip to content

Commit

Permalink
Merge pull request #209157 from Homebrew/cloudfoundry-cli-add-formula
Browse files Browse the repository at this point in the history
cloudfoundry-cli 8.10.0 (new formula)
  • Loading branch information
BrewTestBot authored Feb 27, 2025
2 parents 3cb651e + 78692fa commit 0b5a94b
Show file tree
Hide file tree
Showing 2 changed files with 37 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
36 changes: 36 additions & 0 deletions Formula/c/cloudfoundry-cli.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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"

bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "b84b9fd93860fd4c4d27b10fc10163d83205bd38429a24c175c3ded3ffb28792"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "b84b9fd93860fd4c4d27b10fc10163d83205bd38429a24c175c3ded3ffb28792"
sha256 cellar: :any_skip_relocation, arm64_ventura: "b84b9fd93860fd4c4d27b10fc10163d83205bd38429a24c175c3ded3ffb28792"
sha256 cellar: :any_skip_relocation, sonoma: "47e77bc9bb5c30578845bd388e1c83950f8b99e97b92f1d7172d222ef9803659"
sha256 cellar: :any_skip_relocation, ventura: "47e77bc9bb5c30578845bd388e1c83950f8b99e97b92f1d7172d222ef9803659"
sha256 cellar: :any_skip_relocation, x86_64_linux: "81fb9d93f88926220f397c1f5ccbde22b9319e5a0f0d0845c9698970cff344c3"
end

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 0b5a94b

Please sign in to comment.