-
Notifications
You must be signed in to change notification settings - Fork 5
/
vultr-cli.rb
71 lines (62 loc) · 2.2 KB
/
vultr-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
69
70
71
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class VultrCli < Formula
desc "Official command-line tool for Vultr services"
homepage "https://github.com/vultr/vultr-cli"
version "3.4.0"
on_macos do
on_intel do
url "https://github.com/vultr/vultr-cli/releases/download/v3.4.0/vultr-cli_v3.4.0_macOs_amd64.tar.gz"
sha256 "3e868ba521c8d580d89c811061112fd7f3f0e837e0a08e9d0a00ae8aaaeebbbd"
def install
bin.install "vultr-cli"
prefix.install_metafiles
end
end
on_arm do
url "https://github.com/vultr/vultr-cli/releases/download/v3.4.0/vultr-cli_v3.4.0_macOs_arm64.tar.gz"
sha256 "746a25e1dcb139b14610c92d2e8f24e7b227090c215eb7252167fa4bd899d150"
def install
bin.install "vultr-cli"
prefix.install_metafiles
end
end
end
on_linux do
on_intel do
if Hardware::CPU.is_64_bit?
url "https://github.com/vultr/vultr-cli/releases/download/v3.4.0/vultr-cli_v3.4.0_linux_amd64.tar.gz"
sha256 "3c9b1c7c4762dd0fc6354feb2867fe47d6b394dce9e558df1ed2c7e3e0ad320e"
def install
bin.install "vultr-cli"
prefix.install_metafiles
end
end
end
on_arm do
if !Hardware::CPU.is_64_bit?
url "https://github.com/vultr/vultr-cli/releases/download/v3.4.0/vultr-cli_v3.4.0_linux_arm32-v6.tar.gz"
sha256 "b0ba88f8dec9e592b9c709b7a7285568a2a994dad62813b52c9e1b06ef95f544"
def install
bin.install "vultr-cli"
prefix.install_metafiles
end
end
end
on_arm do
if Hardware::CPU.is_64_bit?
url "https://github.com/vultr/vultr-cli/releases/download/v3.4.0/vultr-cli_v3.4.0_linux_arm64.tar.gz"
sha256 "cf46b1d0f27990a0c7c07561eabfd8123487ac71d774bfb73221793743a05de2"
def install
bin.install "vultr-cli"
prefix.install_metafiles
end
end
end
end
test do
output = shell_output("#{bin}/vultr-cli version 2>&1", 1)
assert_match "Please export your VULTR API key as an environment variable or add `api-key` to your config file, eg:\nexport VULTR_API_KEY='<api_key_from_vultr_account>'\n", output
end
end