-
Notifications
You must be signed in to change notification settings - Fork 5
/
ctlptl.rb
103 lines (83 loc) · 3.42 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.36"
on_macos do
on_intel do
url "https://github.com/tilt-dev/ctlptl/releases/download/v0.8.36/ctlptl.0.8.36.mac.x86_64.tar.gz"
sha256 "0c5de09f34db741ac01aa6b68e42fcf0b0fb6266750123574468d69ab7e1b604"
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
on_arm do
url "https://github.com/tilt-dev/ctlptl/releases/download/v0.8.36/ctlptl.0.8.36.mac.arm64.tar.gz"
sha256 "df81dd37e7dfcfcc4d56d3bb923db697926158d69be79dea272974832e66fe4f"
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
on_intel do
if Hardware::CPU.is_64_bit?
url "https://github.com/tilt-dev/ctlptl/releases/download/v0.8.36/ctlptl.0.8.36.linux.x86_64.tar.gz"
sha256 "0f4994951d922452fc8bfeb0e4953b092383ad1fdb102053a722bac0cafd2d8f"
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_arm do
if Hardware::CPU.is_64_bit?
url "https://github.com/tilt-dev/ctlptl/releases/download/v0.8.36/ctlptl.0.8.36.linux.arm64.tar.gz"
sha256 "229714cb19d4840cad0172279d87e789989a6a097bd235366c3a22e22072855a"
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