-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathctlptl.rb
103 lines (83 loc) · 3.46 KB
/
ctlptl.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class Ctlptl < Formula
desc "Making local Kubernetes clusters easy to set up and tear down"
homepage "https://ctlptl.dev/"
version "0.8.40"
on_macos do
if Hardware::CPU.intel?
url "https://github.com/tilt-dev/ctlptl/releases/download/v0.8.40/ctlptl.0.8.40.mac.x86_64.tar.gz"
sha256 "df6a287d7577913afcbd8dcc08dbfd9bd3af53c70d1b0339c044c06af45edfa2"
def install
bin.install "ctlptl"
# Install bash completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "bash")
(bash_completion/"ctlptl").write output
# Install zsh completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "zsh")
(zsh_completion/"_ctlptl").write output
# Install fish completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "fish")
(fish_completion/"ctlptl.fish").write output
end
end
if Hardware::CPU.arm?
url "https://github.com/tilt-dev/ctlptl/releases/download/v0.8.40/ctlptl.0.8.40.mac.arm64.tar.gz"
sha256 "8ddaf75e4a867e32a841f632df7be1c873637c109877bfd3994880a60dda0367"
def install
bin.install "ctlptl"
# Install bash completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "bash")
(bash_completion/"ctlptl").write output
# Install zsh completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "zsh")
(zsh_completion/"_ctlptl").write output
# Install fish completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "fish")
(fish_completion/"ctlptl.fish").write output
end
end
end
on_linux do
if Hardware::CPU.intel?
if Hardware::CPU.is_64_bit?
url "https://github.com/tilt-dev/ctlptl/releases/download/v0.8.40/ctlptl.0.8.40.linux.x86_64.tar.gz"
sha256 "e62965ea159e512d47971d8558c1db28cd4414c0d65488b0825984ed521eb4e8"
def install
bin.install "ctlptl"
# Install bash completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "bash")
(bash_completion/"ctlptl").write output
# Install zsh completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "zsh")
(zsh_completion/"_ctlptl").write output
# Install fish completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "fish")
(fish_completion/"ctlptl.fish").write output
end
end
end
if Hardware::CPU.arm?
if Hardware::CPU.is_64_bit?
url "https://github.com/tilt-dev/ctlptl/releases/download/v0.8.40/ctlptl.0.8.40.linux.arm64.tar.gz"
sha256 "da50985b396671f4094237b64c6c8e811b84f2b9d6855c0297846816b558d13b"
def install
bin.install "ctlptl"
# Install bash completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "bash")
(bash_completion/"ctlptl").write output
# Install zsh completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "zsh")
(zsh_completion/"_ctlptl").write output
# Install fish completion
output = Utils.safe_popen_read("#{bin}/ctlptl", "completion", "fish")
(fish_completion/"ctlptl.fish").write output
end
end
end
end
test do
system "#{bin}/ctlptl version"
end
end