-
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.14.0
require "fileutils"
class QuickstartAT114 < Formula
homepage "https://github.com/knative-extensions/kn-plugin-quickstart"
v = "knative-v1.14.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 "a5fa85cf3b5a01ddb9c62800d27c30f9beee2dd30dc659b8ae7f169862777767"
elsif OS.mac? && Hardware::CPU.arm?
url "https://github.com/knative-extensions/kn-plugin-quickstart/releases/download/#{v}/kn-quickstart-darwin-arm64"
sha256 "3e362090fd996619473276ba058b0923b52fd4ba23b3fc54db0cd55f5e565826"
elsif OS.linux? && Hardware::CPU.arm?
url "https://github.com/knative-extensions/kn-plugin-quickstart/releases/download/#{v}/kn-quickstart-linux-arm64"
sha256 "14eecd691c053faf8a22806a17bb7b8d70078c9b0db66c45ea9cd1d58911abf6"
else
url "https://github.com/knative-extensions/kn-plugin-quickstart/releases/download/#{v}/kn-quickstart-linux-amd64"
sha256 "723f0369a7a90331b9234fab5349be86e89a5fd6a0a459abbe5f1ee7db2d997c"
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