From cc8181d35403848c7def34313cf6e7b477808335 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Tue, 21 Oct 2025 10:23:48 -0400 Subject: [PATCH 1/2] harbor-cli 0.0.14 (new formula) Signed-off-by: Rui Chen --- Formula/h/harbor-cli.rb | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Formula/h/harbor-cli.rb diff --git a/Formula/h/harbor-cli.rb b/Formula/h/harbor-cli.rb new file mode 100644 index 0000000000000..9c37634129622 --- /dev/null +++ b/Formula/h/harbor-cli.rb @@ -0,0 +1,30 @@ +class HarborCli < Formula + desc "CLI for Harbor container registry" + homepage "https://github.com/goharbor/harbor-cli" + url "https://github.com/goharbor/harbor-cli/archive/refs/tags/v0.0.14.tar.gz" + sha256 "a0518de7b09f0aac262a556d51a149841846dc85a5a4a1eebe79b6da68b6468b" + license "Apache-2.0" + head "https://github.com/goharbor/harbor-cli.git", branch: "main" + + depends_on "go" => :build + + def install + ldflags = %W[ + -s -w + -X github.com/goharbor/harbor-cli/cmd/harbor/internal/version.Version=#{version} + -X github.com/goharbor/harbor-cli/cmd/harbor/internal/version.GoVersion=#{Formula["go"].version} + -X github.com/goharbor/harbor-cli/cmd/harbor/internal/version.GitCommit=#{tap.user} + -X github.com/goharbor/harbor-cli/cmd/harbor/internal/version.BuildTime=#{time.iso8601} + ] + system "go", "build", *std_go_args(ldflags:, output: bin/"harbor"), "./cmd/harbor" + + generate_completions_from_executable(bin/"harbor", "completion", shells: [:bash, :zsh, :fish, :pwsh]) + end + + test do + assert_match version.to_s, shell_output("#{bin}/harbor version") + + output = shell_output("#{bin}/harbor repo list 2>&1", 1) + assert_match "Error: failed to get project name", output + end +end From a4635943389bd0239cd3d5fab7a7ed3789530bde Mon Sep 17 00:00:00 2001 From: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> Date: Wed, 29 Oct 2025 01:49:50 +0000 Subject: [PATCH 2/2] harbor-cli: add 0.0.14 bottle. --- Formula/h/harbor-cli.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Formula/h/harbor-cli.rb b/Formula/h/harbor-cli.rb index 9c37634129622..6061d624e3883 100644 --- a/Formula/h/harbor-cli.rb +++ b/Formula/h/harbor-cli.rb @@ -6,6 +6,14 @@ class HarborCli < Formula license "Apache-2.0" head "https://github.com/goharbor/harbor-cli.git", branch: "main" + bottle do + sha256 cellar: :any_skip_relocation, arm64_tahoe: "7dba396bcb743afdb4369377188da49c0c7c9401ca02cda017a67f10c7366c0c" + sha256 cellar: :any_skip_relocation, arm64_sequoia: "7dba396bcb743afdb4369377188da49c0c7c9401ca02cda017a67f10c7366c0c" + sha256 cellar: :any_skip_relocation, arm64_sonoma: "7dba396bcb743afdb4369377188da49c0c7c9401ca02cda017a67f10c7366c0c" + sha256 cellar: :any_skip_relocation, sonoma: "21873226774fb128fe5b9762315e54f7a22aaccd781e9a658546e88a8d648b91" + sha256 cellar: :any_skip_relocation, x86_64_linux: "e78633ed481ca1e21566ea4036a3cdc5c8cbc7276da376d5c37efe96f9b4f1f0" + end + depends_on "go" => :build def install