-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhookdeck.rb
59 lines (54 loc) · 2 KB
/
hookdeck.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
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class Hookdeck < Formula
desc "Hookdeck CLI utility"
homepage "https://hookdeck.com"
version "0.11.2"
depends_on :macos
on_intel do
url "https://github.com/hookdeck/hookdeck-cli/releases/download/v0.11.2/hookdeck_0.11.2_darwin_amd64.tar.gz"
sha256 "73cf131f3cd2adedda86759e77f5fbe1758a197dfb75bf62d49ce0fd74f8c5ce"
def install
bin.install "hookdeck"
rm Dir["#{bin}/{hookdeck-completion.bash,hookdeck-completion.zsh}"]
system bin/"hookdeck", "completion", "--shell", "bash"
system bin/"hookdeck", "completion", "--shell", "zsh"
bash_completion.install "hookdeck-completion.bash"
zsh_completion.install "hookdeck-completion.zsh"
(zsh_completion/"_hookdeck").write <<~EOS
#compdef hookdeck
_hookdeck () {
local e
e=$(dirname ${funcsourcetrace[1]%:*})/hookdeck-completion.zsh
if [[ -f $e ]]; then source $e; fi
}
EOS
end
end
on_arm do
url "https://github.com/hookdeck/hookdeck-cli/releases/download/v0.11.2/hookdeck_0.11.2_darwin_arm64.tar.gz"
sha256 "19e22196078c1e114196ef8ed2d58ef9c209aad8a9dac6868b431046e567c7ee"
def install
bin.install "hookdeck"
rm Dir["#{bin}/{hookdeck-completion.bash,hookdeck-completion.zsh}"]
system bin/"hookdeck", "completion", "--shell", "bash"
system bin/"hookdeck", "completion", "--shell", "zsh"
bash_completion.install "hookdeck-completion.bash"
zsh_completion.install "hookdeck-completion.zsh"
(zsh_completion/"_hookdeck").write <<~EOS
#compdef hookdeck
_hookdeck () {
local e
e=$(dirname ${funcsourcetrace[1]%:*})/hookdeck-completion.zsh
if [[ -f $e ]]; then source $e; fi
}
EOS
end
end
def caveats
<<~EOS
❤ Thanks for installing the Hookdeck CLI! If this is your first time using the CLI, be sure to run `hookdeck login` first.
EOS
end
end