-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathopc.rb
71 lines (64 loc) · 2.59 KB
/
opc.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
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class Opc < Formula
desc "A CLI for OpenShift Pipeline"
homepage "https://github.com/openshift-pipelines/opc"
version "1.17.0"
on_macos do
if Hardware::CPU.intel?
url "https://github.com/openshift-pipelines/opc/releases/download/v1.17.0/opc_1.17.0_darwin_x86_64.tar.gz"
sha256 "eaf30d97bb363a6f996e1f500c114d4fd0f962967a94f1f9cf3cdd718f4889d3"
def install
bin.install "opc" => "opc"
output = Utils.popen_read("SHELL=bash #{bin}/opc completion bash")
(bash_completion/"opc").write output
output = Utils.popen_read("SHELL=zsh #{bin}/opc completion zsh")
(zsh_completion/"_opc").write output
prefix.install_metafiles
end
end
if Hardware::CPU.arm?
url "https://github.com/openshift-pipelines/opc/releases/download/v1.17.0/opc_1.17.0_darwin_arm64.tar.gz"
sha256 "fa28f110b6ca2084aa38448b071660a9641151966ab0ed505e010c7ac82b39cb"
def install
bin.install "opc" => "opc"
output = Utils.popen_read("SHELL=bash #{bin}/opc completion bash")
(bash_completion/"opc").write output
output = Utils.popen_read("SHELL=zsh #{bin}/opc completion zsh")
(zsh_completion/"_opc").write output
prefix.install_metafiles
end
end
end
on_linux do
if Hardware::CPU.intel?
if Hardware::CPU.is_64_bit?
url "https://github.com/openshift-pipelines/opc/releases/download/v1.17.0/opc_1.17.0_linux_x86_64.tar.gz"
sha256 "d3c482a72c45c125168bdf5b242cf03095fef077b00030eebe129848e09840c3"
def install
bin.install "opc" => "opc"
output = Utils.popen_read("SHELL=bash #{bin}/opc completion bash")
(bash_completion/"opc").write output
output = Utils.popen_read("SHELL=zsh #{bin}/opc completion zsh")
(zsh_completion/"_opc").write output
prefix.install_metafiles
end
end
end
if Hardware::CPU.arm?
if Hardware::CPU.is_64_bit?
url "https://github.com/openshift-pipelines/opc/releases/download/v1.17.0/opc_1.17.0_linux_arm64.tar.gz"
sha256 "9e16faefd12c939a3dafb426c5e3061b7565272b4dd2fb20b20befb6b4d4812b"
def install
bin.install "opc" => "opc"
output = Utils.popen_read("SHELL=bash #{bin}/opc completion bash")
(bash_completion/"opc").write output
output = Utils.popen_read("SHELL=zsh #{bin}/opc completion zsh")
(zsh_completion/"_opc").write output
prefix.install_metafiles
end
end
end
end
end