-
Notifications
You must be signed in to change notification settings - Fork 21
43 lines (37 loc) · 1.71 KB
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
# Generated through hack/update-codegen.sh. Don't edit manually.
# Next line is used to identify version of the file.
# quickstart_version:1.15.0
require "fileutils"
class QuickstartAT115 < Formula
homepage "https://github.com/knative-extensions/kn-plugin-quickstart"
v = "knative-v1.15.0"
version v
if OS.mac? && Hardware::CPU.intel?
url "https://github.com/knative-extensions/kn-plugin-quickstart/releases/download/#{v}/kn-quickstart-darwin-amd64"
sha256 "ac485e9320d125c913c6cc54bf9eaef61207ec803750eaa7a048a654681441df"
elsif OS.mac? && Hardware::CPU.arm?
url "https://github.com/knative-extensions/kn-plugin-quickstart/releases/download/#{v}/kn-quickstart-darwin-arm64"
sha256 "40a5837e50bcfe578e4fee81d1955b1924280a537cdfff7991266d69f072b40d"
elsif OS.linux? && Hardware::CPU.arm?
url "https://github.com/knative-extensions/kn-plugin-quickstart/releases/download/#{v}/kn-quickstart-linux-arm64"
sha256 "092d35a34bf170a0db32feaeb07165d7170f85d7b7cbee660dc5d27e5773e517"
else
url "https://github.com/knative-extensions/kn-plugin-quickstart/releases/download/#{v}/kn-quickstart-linux-amd64"
sha256 "5a2ef86aa572f20a3a7fea538f13c3838514b2c9a89946bfe93bdd68a3803d0b"
end
def install
if OS.mac? && Hardware::CPU.intel?
FileUtils.mv("kn-quickstart-darwin-amd64", "kn-quickstart")
elsif OS.mac? && Hardware::CPU.arm?
FileUtils.mv("kn-quickstart-darwin-arm64", "kn-quickstart")
elsif OS.linux? && Hardware::CPU.arm?
FileUtils.mv("kn-quickstart-linux-arm64", "kn-quickstart")
else
FileUtils.mv("kn-quickstart-linux-amd64", "kn-quickstart")
end
bin.install "kn-quickstart"
end
test do
system "#{bin}/kn-quickstart", "version"
end
end