Skip to content

Commit

Permalink
Update func to v1.11.0 release (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimansk authored Jul 28, 2023
1 parent ea35067 commit edaf8f8
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 5 deletions.
10 changes: 5 additions & 5 deletions func.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'fileutils'

class Func < Formula
v = "v1.10.1"
v = "v1.11.0"
plugin_name = "func"
path_name = "#{plugin_name}"
file_name = "#{plugin_name}"
Expand All @@ -14,20 +14,20 @@ class Func < Formula
if OS.mac?
if `uname -m`.chomp == "arm64"
url "#{base_url}/#{file_name}_darwin_arm64"
sha256 "a30420514bdc88178a65fb3321f0841a582be23715c5c8028302d1d433186487"
sha256 "e8c1fc6c99fbb88e170bdb6b096e0e76fea1d93ea09c8e4db262edeb63cab014"
else
url "#{base_url}/#{file_name}_darwin_amd64"
sha256 "6ff69e2b2f763c5e0182dc5bf43e8552b60b8951c8c60d943c159277f2ae5f5b"
sha256 "aeaa2ae81c3c58daa8c66cd4d4091641308b7356c1474c705e604f0b92b61249"
end
end

if OS.linux?
if `uname -m`.chomp == "arm64"
url "#{base_url}/#{file_name}_linux_arm64"
sha256 "7e9cc650cc0d827a0bf5ba8f9e1fc549aa13d8050eb31a65564ca09691122218"
sha256 "37836fd1715d43e209ad6353c7ff41c2e170bdb56d91c03f6d6c88392c7ea4bf"
else
url "#{base_url}/#{file_name}_linux_amd64"
sha256 "1a8cfb70045a3afe6fa6f663085d5d971d84ea7ef714852980780765952b0901"
sha256 "191b2981698ffae35172f6b46fae45b7d0d73033f5338a2536a9428fc6754a22"
end
end

Expand Down
59 changes: 59 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
require 'fileutils'

class FuncAT110 < Formula
v = "v1.10.1"
plugin_name = "func"
path_name = "#{plugin_name}"
file_name = "#{plugin_name}"
base_url = "https://github.com/knative/#{path_name}/releases/download/knative-#{v}"

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

version v

if OS.mac?
if `uname -m`.chomp == "arm64"
url "#{base_url}/#{file_name}_darwin_arm64"
sha256 "a30420514bdc88178a65fb3321f0841a582be23715c5c8028302d1d433186487"
else
url "#{base_url}/#{file_name}_darwin_amd64"
sha256 "6ff69e2b2f763c5e0182dc5bf43e8552b60b8951c8c60d943c159277f2ae5f5b"
end
end

if OS.linux?
if `uname -m`.chomp == "arm64"
url "#{base_url}/#{file_name}_linux_arm64"
sha256 "7e9cc650cc0d827a0bf5ba8f9e1fc549aa13d8050eb31a65564ca09691122218"
else
url "#{base_url}/#{file_name}_linux_amd64"
sha256 "1a8cfb70045a3afe6fa6f663085d5d971d84ea7ef714852980780765952b0901"
end
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
end
if OS.linux?
if `uname -m`.chomp == "arm64"
FileUtils.mv("func_linux_arm64", "kn-func")
else
FileUtils.mv("func_linux_amd64", "kn-func")
end
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

0 comments on commit edaf8f8

Please sign in to comment.