-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathkink.rb
97 lines (88 loc) · 3.47 KB
/
kink.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# typed: false
# frozen_string_literal: true
# This file was generated by GoReleaser. DO NOT EDIT.
class Kink < Formula
desc "KinK is a helper CLI that facilitates to manage KinD clusters as Kubernetes pods. Designed to ease clusters up for fast testing with batteries included in mind."
homepage "https://github.com/trendyol"
version "0.2.1"
license "MIT"
on_macos do
if Hardware::CPU.arm?
url "https://github.com/Trendyol/kink/releases/download/v0.2.1/kink_0.2.1_Darwin-arm64.tar.gz"
sha256 "19e4e07ab34a42411bc7e4381d1153e0c6c90284f76ddf2197f5accadbc79083"
def install
if build.head?
project = "github.com/Trendyol/kink"
ldflags = %W[
-s -w
-X #{project}/cmd.GitVersion=#{Utils.git_branch}
-X #{project}/cmd.gitCommit=#{Utils.git_short_head}
-X #{project}/cmd.gitTreeState=clean
-X #{project}/cmd.buildDate=#{Time.now.utc.iso8601}
]
system "go", "build", *std_go_args(output: "kink", ldflags: ldflags.join(" ")), "main.go"
system "./scripts/completions.sh"
end
bin.install "kink"
bash_completion.install "completions/kink.bash" => "kink"
zsh_completion.install "completions/kink.zsh" => "_kink"
fish_completion.install "completions/kink.fish"
end
end
if Hardware::CPU.intel?
url "https://github.com/Trendyol/kink/releases/download/v0.2.1/kink_0.2.1_Darwin-x86_64.tar.gz"
sha256 "4dcdb0e38b85bf4a37f414d244cb72f70ea5b6a1b95d27eed421e28d71098845"
def install
if build.head?
project = "github.com/Trendyol/kink"
ldflags = %W[
-s -w
-X #{project}/cmd.GitVersion=#{Utils.git_branch}
-X #{project}/cmd.gitCommit=#{Utils.git_short_head}
-X #{project}/cmd.gitTreeState=clean
-X #{project}/cmd.buildDate=#{Time.now.utc.iso8601}
]
system "go", "build", *std_go_args(output: "kink", ldflags: ldflags.join(" ")), "main.go"
system "./scripts/completions.sh"
end
bin.install "kink"
bash_completion.install "completions/kink.bash" => "kink"
zsh_completion.install "completions/kink.zsh" => "_kink"
fish_completion.install "completions/kink.fish"
end
end
end
on_linux do
if Hardware::CPU.intel?
url "https://github.com/Trendyol/kink/releases/download/v0.2.1/kink_0.2.1_Linux-x86_64.tar.gz"
sha256 "6d83ed47516f9454dd24d06e6b10081e77da959556864ebbc53054539deebc4f"
def install
if build.head?
project = "github.com/Trendyol/kink"
ldflags = %W[
-s -w
-X #{project}/cmd.GitVersion=#{Utils.git_branch}
-X #{project}/cmd.gitCommit=#{Utils.git_short_head}
-X #{project}/cmd.gitTreeState=clean
-X #{project}/cmd.buildDate=#{Time.now.utc.iso8601}
]
system "go", "build", *std_go_args(output: "kink", ldflags: ldflags.join(" ")), "main.go"
system "./scripts/completions.sh"
end
bin.install "kink"
bash_completion.install "completions/kink.bash" => "kink"
zsh_completion.install "completions/kink.zsh" => "_kink"
fish_completion.install "completions/kink.fish"
end
end
end
head "https://github.com/Trendyol/kink.git", branch: "main"
head do
depends_on "go" => :build
end
depends_on "go" => :optional
depends_on "git"
test do
system "#{bin}/kink version"
end
end