forked from aws/homebrew-tap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qldbshell.rb
26 lines (21 loc) · 1.01 KB
/
qldbshell.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
# -*- coding: utf-8 -*-
require_relative '../ConfigProvider/config_provider'
class Qldbshell < Formula
$config_provider = ConfigProvider.new('qldbshell')
desc "A CLI for interacting with QLDB ledgers"
homepage "https://github.com/awslabs/amazon-qldb-shell"
version $config_provider.version
if OS.mac?
# e.g. https://github.com/awslabs/amazon-qldb-shell/releases/download/v2.0.9/qldb-v2.0.9-mac.tar.gz
url "#{$config_provider.root_url}v#{$config_provider.version}/#{$config_provider.bin}-v#{$config_provider.version}-mac.tar.gz"
sha256 $config_provider.sierra_hash
elsif OS.linux?
# e.g. https://github.com/awslabs/amazon-qldb-shell/releases/download/v2.0.9/qldb-v2.0.9-linux.tar.gz
url "#{$config_provider.root_url}v#{$config_provider.version}/#{$config_provider.bin}-v#{$config_provider.version}-linux.tar.gz"
sha256 $config_provider.linux_hash
end
def install
bin.install $config_provider.bin
puts "Run `qldb --ledger <your ledger name>` to start using the QLDB Shell"
end
end