forked from aws/homebrew-tap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ec2-spot-interrupter.rb
58 lines (49 loc) · 1.82 KB
/
ec2-spot-interrupter.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
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class Ec2SpotInterrupter < Formula
desc "A simple CLI tool that triggers Amazon EC2 Spot Interruption Notifications and Rebalance Recommendations."
homepage "https://github.com/aws/amazon-ec2-spot-interrupter"
version "0.0.10"
license "Apache-2"
on_macos do
if Hardware::CPU.arm?
url "https://github.com/aws/amazon-ec2-spot-interrupter/releases/download/v0.0.10/ec2-spot-interrupter_0.0.10_Darwin_arm64.tar.gz"
sha256 "fdaaf998cc1baab7cfdd6bdecee394ffba914738696cb731c630e3d41fdcdf20"
def install
bin.install "ec2-spot-interrupter"
end
end
if Hardware::CPU.intel?
url "https://github.com/aws/amazon-ec2-spot-interrupter/releases/download/v0.0.10/ec2-spot-interrupter_0.0.10_Darwin_amd64.tar.gz"
sha256 "6c80f89ffb176f7c06eebc2a7233c066e6bd601f09c41a60ef18a6d7d43eabe9"
def install
bin.install "ec2-spot-interrupter"
end
end
end
on_linux do
if Hardware::CPU.arm? && !Hardware::CPU.is_64_bit?
url "https://github.com/aws/amazon-ec2-spot-interrupter/releases/download/v0.0.10/ec2-spot-interrupter_0.0.10_Linux_armv6.tar.gz"
sha256 "fdf4381bfaaa0b697dd04f9edacba0c391f5876661243043aa8eea4cdf5ff2c8"
def install
bin.install "ec2-spot-interrupter"
end
end
if Hardware::CPU.intel?
url "https://github.com/aws/amazon-ec2-spot-interrupter/releases/download/v0.0.10/ec2-spot-interrupter_0.0.10_Linux_amd64.tar.gz"
sha256 "e8a946b2b20504e3aa666bd91ae2b60c68c328712e848cb1d6520866a5865070"
def install
bin.install "ec2-spot-interrupter"
end
end
end
def caveats
<<~EOS
ec2-spot-interrupter --interactive
EOS
end
test do
system "#{bin}/program --version"
end
end