Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

func: bump to 0.24 #92

Merged
merged 2 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions func.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'fileutils'

class Func < Formula
v = "v0.23.1"
v = "v0.24.0"
plugin_name = "func"
path_name = "kn-plugin-#{plugin_name}"
file_name = "#{plugin_name}"
Expand All @@ -14,14 +14,14 @@ class Func < Formula
if OS.mac?
if `uname -m`.chomp == "arm64"
url "#{base_url}/#{file_name}_darwin_arm64"
sha256 "05f20523872f94540be222c1c6ecf7dca86e7c909ae6c7f0a12ff5bbbf064eb9"
sha256 "969b7ec3494d13e699038e75f3210e81313fa103b65f10b45e7e7d9a370cadbb"
else
url "#{base_url}/#{file_name}_darwin_amd64"
sha256 "47424efa16ba064efd8348bf6fb85396d0a3771e648435ba051d466b721111da"
sha256 "5e83fd1fb52b742c2e985df785ab52ab42d8c4cee7eec7706699f014bfb39aca"
end
else
url "#{base_url}/#{file_name}_linux_amd64"
sha256 "fea929a0d4a29fd1e8fd81c96d7c1b5e96756138077b29459db33772a2e17105"
sha256 "3244c3c5ac346b950d78c9bb2267ee88606fb0a971d4a51a0973a323f1d6090d"
end

def install
Expand Down
47 changes: 47 additions & 0 deletions func@0.23.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
require 'fileutils'

class FuncAT023 < Formula
v = "v0.23.1"
plugin_name = "func"
path_name = "kn-plugin-#{plugin_name}"
file_name = "#{plugin_name}"
base_url = "https://github.com/knative-sandbox/#{path_name}/releases/download/#{v}"

homepage "https://github.com/knative-sandbox/#{path_name}"

version v

if OS.mac?
if `uname -m`.chomp == "arm64"
url "#{base_url}/#{file_name}_darwin_arm64"
sha256 "05f20523872f94540be222c1c6ecf7dca86e7c909ae6c7f0a12ff5bbbf064eb9"
else
url "#{base_url}/#{file_name}_darwin_amd64"
sha256 "47424efa16ba064efd8348bf6fb85396d0a3771e648435ba051d466b721111da"
end
else
url "#{base_url}/#{file_name}_linux_amd64"
sha256 "fea929a0d4a29fd1e8fd81c96d7c1b5e96756138077b29459db33772a2e17105"
end

def install
if OS.mac?
if `uname -m`.chomp == "arm64"
FileUtils.mv("func_darwin_arm64", "kn-func")
else
FileUtils.mv("func_darwin_amd64", "kn-func")
end
else
FileUtils.mv("func_linux_amd64", "kn-func")
end
p "Installing kn-func binary in " + bin
bin.install "kn-func"
p "Installing func symlink in " + bin
ln_s "kn-func", bin/"func"
end

test do
system "#{bin}/kn-func", "version"
end
end