forked from stripe/homebrew-stripe-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stripe.rb
60 lines (55 loc) · 2.05 KB
/
stripe.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
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class Stripe < Formula
desc "Stripe CLI utility"
homepage "https://stripe.com"
version "1.19.4"
depends_on :macos
on_macos do
if Hardware::CPU.arm?
url "https://github.com/stripe/stripe-cli/releases/download/v1.19.4/stripe_1.19.4_mac-os_arm64.tar.gz"
sha256 "e014bd637ec9bf2ad268cb61cb05c37075aad5e8e37c59e553db54d96284decd"
def install
bin.install "stripe"
rm Dir["#{bin}/{stripe-completion.bash,stripe-completion.zsh}"]
system bin/"stripe", "completion", "--shell", "bash"
system bin/"stripe", "completion", "--shell", "zsh"
bash_completion.install "stripe-completion.bash"
zsh_completion.install "stripe-completion.zsh"
(zsh_completion/"_stripe").write <<~EOS
#compdef stripe
_stripe () {
local e
e=$(dirname ${funcsourcetrace[1]%:*})/stripe-completion.zsh
if [[ -f $e ]]; then source $e; fi
}
EOS
end
end
if Hardware::CPU.intel?
url "https://github.com/stripe/stripe-cli/releases/download/v1.19.4/stripe_1.19.4_mac-os_x86_64.tar.gz"
sha256 "db17cb2a25bc5a115e9260e89095cb30de241c923b2c280de95fefab2d0bac18"
def install
bin.install "stripe"
rm Dir["#{bin}/{stripe-completion.bash,stripe-completion.zsh}"]
system bin/"stripe", "completion", "--shell", "bash"
system bin/"stripe", "completion", "--shell", "zsh"
bash_completion.install "stripe-completion.bash"
zsh_completion.install "stripe-completion.zsh"
(zsh_completion/"_stripe").write <<~EOS
#compdef stripe
_stripe () {
local e
e=$(dirname ${funcsourcetrace[1]%:*})/stripe-completion.zsh
if [[ -f $e ]]; then source $e; fi
}
EOS
end
end
end
def caveats; <<~EOS
❤ Thanks for installing the Stripe CLI! If this is your first time using the CLI, be sure to run `stripe login` first.
EOS
end
end