-
Notifications
You must be signed in to change notification settings - Fork 21
43 lines (37 loc) · 1.6 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.
# event_version:1.13.0
require "fileutils"
class EventAT113 < Formula
homepage "https://github.com/knative-extensions/kn-plugin-event"
v = "knative-v1.13.0"
version v
if OS.mac? && Hardware::CPU.intel?
url "https://github.com/knative-extensions/kn-plugin-event/releases/download/#{v}/kn-event-darwin-amd64"
sha256 "fc28b5ff9fc4cda44abe56c7e440da9cc2258f3b3fe0ffb060b2e4fd5d4fc890"
elsif OS.mac? && Hardware::CPU.arm?
url "https://github.com/knative-extensions/kn-plugin-event/releases/download/#{v}/kn-event-darwin-arm64"
sha256 "d58473cfa684fa3f868cf37d98583a9a5327f874d9b249755c6e1a5fe035fce0"
elsif OS.linux? && Hardware::CPU.arm?
url "https://github.com/knative-extensions/kn-plugin-event/releases/download/#{v}/kn-event-linux-arm64"
sha256 "efe341fb9e7829f2e0a929f51450bc55b231e01cb30ec2b3bf4be398bb02bca5"
else
url "https://github.com/knative-extensions/kn-plugin-event/releases/download/#{v}/kn-event-linux-amd64"
sha256 "030f913bc8e533bd0cbee261bd08273f628d8b1792639e4e5146f5085d729d9a"
end
def install
if OS.mac? && Hardware::CPU.intel?
FileUtils.mv("kn-event-darwin-amd64", "kn-event")
elsif OS.mac? && Hardware::CPU.arm?
FileUtils.mv("kn-event-darwin-arm64", "kn-event")
elsif OS.linux? && Hardware::CPU.arm?
FileUtils.mv("kn-event-linux-arm64", "kn-event")
else
FileUtils.mv("kn-event-linux-amd64", "kn-event")
end
bin.install "kn-event"
end
test do
system "#{bin}/kn-event", "version"
end
end