forked from aws/homebrew-tap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
emr-on-eks-custom-image.rb
39 lines (30 loc) · 1.03 KB
/
emr-on-eks-custom-image.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
# -*- coding: utf-8 -*-
require_relative '../ConfigProvider/config_provider'
class EmrOnEksCustomImage < Formula
$config_provider = ConfigProvider.new('amazon-emr-on-eks-custom-image-cli')
desc "Amazon EMR on EKS Custom Image CLI"
homepage "https://github.com/awslabs/amazon-emr-on-eks-custom-image-cli"
version $config_provider.version
license "Apache-2.0"
if OS.mac?
url "#{$config_provider.root_url}-mac-v#{$config_provider.version}.zip"
sha256 $config_provider.sierra_hash
end
if OS.linux?
url "#{$config_provider.root_url}-linux-v#{$config_provider.version}.zip"
sha256 $config_provider.linux_hash
end
def caveats
<<~EOF
=====WARNING=====
This tool utilizes Docker CLI to help validate custom images.
Please make sure you have Docker CLI installed prior to using the tool.
EOF
end
def install
bin.install "dist/#{$config_provider.bin}"
end
test do
assert_match "Amazon EMR on EKS - Custom Image CLI", shell_output("#{bin}/#{$config_provider.bin}")
end
end