From 80e21567ccc5d756a3e8f9273d13e2825cd16883 Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Thu, 27 Feb 2025 11:16:23 -0800 Subject: [PATCH 1/2] cloudfoundry-cli 8.10.0 (new formula) Signed-off-by: Patrick Linnane --- .github/autobump.txt | 1 + Formula/c/cloudfoundry-cli.rb | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 Formula/c/cloudfoundry-cli.rb diff --git a/.github/autobump.txt b/.github/autobump.txt index 7cec646f74f59..181de61b083fe 100644 --- a/.github/autobump.txt +++ b/.github/autobump.txt @@ -540,6 +540,7 @@ cloudflare-wrangler cloudflared cloudformation-cli cloudformation-guard +cloudfoundry-cli cloudfox cloudlist cloudprober diff --git a/Formula/c/cloudfoundry-cli.rb b/Formula/c/cloudfoundry-cli.rb new file mode 100644 index 0000000000000..a4e893c3349d9 --- /dev/null +++ b/Formula/c/cloudfoundry-cli.rb @@ -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 From 78692fa2bebf44a3653b5529d1eb342e32652010 Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Thu, 27 Feb 2025 19:50:30 +0000 Subject: [PATCH 2/2] cloudfoundry-cli: add 8.10.0 bottle. --- Formula/c/cloudfoundry-cli.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Formula/c/cloudfoundry-cli.rb b/Formula/c/cloudfoundry-cli.rb index a4e893c3349d9..f58726b93a667 100644 --- a/Formula/c/cloudfoundry-cli.rb +++ b/Formula/c/cloudfoundry-cli.rb @@ -6,6 +6,15 @@ class CloudfoundryCli < Formula 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