-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Expand file tree
/
Copy pathjfrog-cli.rb
More file actions
43 lines (37 loc) 路 1.95 KB
/
Copy pathjfrog-cli.rb
File metadata and controls
43 lines (37 loc) 路 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class JfrogCli < Formula
desc "Command-line interface for JFrog products"
homepage "https://www.jfrog.com/confluence/display/CLI/JFrog+CLI"
url "https://github.com/jfrog/jfrog-cli/archive/refs/tags/v2.72.3.tar.gz"
sha256 "43ceced6f8baab67dcf5e53e31c7dbfb8c4e233d750e95dc5270de279a16c986"
license "Apache-2.0"
head "https://github.com/jfrog/jfrog-cli.git", branch: "v2"
# There can be a notable gap between when a version is tagged and a
# corresponding release is created, so we check the "latest" release instead
# of the Git tags.
livecheck do
url :stable
strategy :github_latest
end
bottle do
sha256 cellar: :any_skip_relocation, arm64_sequoia: "d29864ff2444b63e05b09b02396c6bbcb07ed23dfc02ddd060e7fd0289402f1e"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "d29864ff2444b63e05b09b02396c6bbcb07ed23dfc02ddd060e7fd0289402f1e"
sha256 cellar: :any_skip_relocation, arm64_ventura: "d29864ff2444b63e05b09b02396c6bbcb07ed23dfc02ddd060e7fd0289402f1e"
sha256 cellar: :any_skip_relocation, sonoma: "eb4c0605350b08ddafd289d7baab01d1277c48f573750b290b6eccdee777ad96"
sha256 cellar: :any_skip_relocation, ventura: "eb4c0605350b08ddafd289d7baab01d1277c48f573750b290b6eccdee777ad96"
sha256 cellar: :any_skip_relocation, x86_64_linux: "248fbeee1dc39bfc3bd93b6c3b6b03f440e3fb0dcd3704fb1b52be207d82619b"
end
depends_on "go" => :build
def install
system "go", "build", *std_go_args(ldflags: "-s -w", output: bin/"jf")
bin.install_symlink "jf" => "jfrog"
generate_completions_from_executable(bin/"jf", "completion", base_name: "jf")
end
test do
assert_match version.to_s, shell_output("#{bin}/jf -v")
assert_match version.to_s, shell_output("#{bin}/jfrog -v")
with_env(JFROG_CLI_REPORT_USAGE: "false", CI: "true") do
assert_match "build name must be provided in order to generate build-info",
shell_output("#{bin}/jf rt bp --dry-run --url=http://127.0.0.1 2>&1", 1)
end
end
end