-
Notifications
You must be signed in to change notification settings - Fork 0
/
vcf-cli.rb
39 lines (31 loc) · 1.13 KB
/
vcf-cli.rb
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
# Copyright 2023 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
class VcfCli < Formula
desc "VCF command-line tool"
homepage "https://github.com/vmware/homebrew-vcfcli"
version "1.1.0"
checksums = {
"darwin-amd64" => "4b9b9875a80bc576c461b8d173d69b2e2f65abe2b8fe1074fff9e61958840b71",
"darwin-arm64" => "5484d8f5d8350129e80d89639a4e23423857151633a1fc66f4f9680a26c395bf",
}
$arch = "arm64"
on_intel do
$arch = "amd64"
end
$os = "darwin"
url "https://packages.broadcom.com/artifactory/vcf-distro/vcf-cli/#{$os}/#{$arch}/v#{version}/vcf-cli.tar.gz"
sha256 checksums["#{$os}-#{$arch}"]
def install
# Install the VCF CLI
bin.install "vcf-cli-#{$os}_#{$arch}" => "vcf"
end
# This verifies the installation
test do
# DO NOT set the eula or ceip values here as they would be persisted
# for the user's release installation. Instead, just use commands that
# don't trigger the prompts.
assert_match "version: v#{version}", shell_output("#{bin}/vcf version")
output = shell_output("#{bin}/vcf plugin -h")
assert_match "Manage CLI plugins", output
end
end