-
Notifications
You must be signed in to change notification settings - Fork 1
/
metal-cli.rb
68 lines (58 loc) · 1.89 KB
/
metal-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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class MetalCli < Formula
desc "Official Equinix Metal CLI"
homepage "https://deploy.equinix.com/developers/docs/metal/libraries/cli/"
version "0.25.0"
license "MIT"
depends_on "go" => :build
on_macos do
on_intel do
url "https://github.com/equinix/metal-cli/releases/download/v0.25.0/metal-darwin-amd64"
sha256 "ea049d28a49b3d208a89ee58cb998b706c6eebcb0ef7575d71f48fdb23107d5f"
def install
bin.install "metal-darwin-amd64" => "metal"
end
end
on_arm do
url "https://github.com/equinix/metal-cli/releases/download/v0.25.0/metal-darwin-arm64"
sha256 "dbae1e3aef5850baea6e9d7cd024c1ff9febee0eb2468c806b5c5385fc7a81f2"
def install
bin.install "metal-darwin-arm64" => "metal"
end
end
end
on_linux do
on_intel do
if Hardware::CPU.is_64_bit?
url "https://github.com/equinix/metal-cli/releases/download/v0.25.0/metal-linux-amd64"
sha256 "243d6f4e14310df02504b0ab0cbd3b8618288c0e32a68b6818206e5671cd3e39"
def install
bin.install "metal-linux-amd64" => "metal"
end
end
end
on_arm do
if !Hardware::CPU.is_64_bit?
url "https://github.com/equinix/metal-cli/releases/download/v0.25.0/metal-linux-armv6"
sha256 "3b777f0c6c085cdff6d5baf1dd769b8a5ceac63307176bff4967d3ba2af057c1"
def install
bin.install "metal-linux-armv6" => "metal"
end
end
end
on_arm do
if Hardware::CPU.is_64_bit?
url "https://github.com/equinix/metal-cli/releases/download/v0.25.0/metal-linux-arm64"
sha256 "47dc8fb97e4c232c680d38ddcd89cfdb61865aa596e20ce479066c27f03894a1"
def install
bin.install "metal-linux-arm64" => "metal"
end
end
end
end
test do
system "#{bin}/metal -v"
end
end