-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathevent@1.12.rb
43 lines (37 loc) · 1.6 KB
/
event@1.12.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
# Generated through hack/update-codegen.sh. Don't edit manually.
# Next line is used to identify version of the file.
# event_version:1.12.0
require "fileutils"
class EventAT112 < Formula
homepage "https://github.com/knative-extensions/kn-plugin-event"
v = "knative-v1.12.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 "9f0064d4aa0f59927a9e79ee7e7fbc665afee14ddaf173321c9bddf2077bb80b"
elsif OS.mac? && Hardware::CPU.arm?
url "https://github.com/knative-extensions/kn-plugin-event/releases/download/#{v}/kn-event-darwin-arm64"
sha256 "67b35d73fff23e135e6fac1b7aa05abe67f5ac5db4bcced1d59991ea303a5c22"
elsif OS.linux? && Hardware::CPU.arm?
url "https://github.com/knative-extensions/kn-plugin-event/releases/download/#{v}/kn-event-linux-arm64"
sha256 "c26da715fa046e83814fe402450f3f3d75a78e152897ad5c1c949ca539b5d688"
else
url "https://github.com/knative-extensions/kn-plugin-event/releases/download/#{v}/kn-event-linux-amd64"
sha256 "faa6e3039c878fc994072530c924852ed58cab06cfe96bfe940b14a9e34270d3"
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