diff --git a/kn.rb b/kn.rb index fab00e3..7480760 100644 --- a/kn.rb +++ b/kn.rb @@ -1,26 +1,26 @@ # Generated through hack/update-codegen.sh. Don't edit manually. # Next line is used to identify version of the file. -# kn_version:1.16.0 +# kn_version:1.17.0 require "fileutils" class Kn < Formula homepage "https://github.com/knative/client" - v = "knative-v1.16.0" + v = "knative-v1.17.0" version v if OS.mac? && Hardware::CPU.intel? url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-amd64" - sha256 "5ce094218d753e34534caf35938f17b4ea0286d0c22413d2073c23990a97bd76" + sha256 "8926f6a58a1fb4aeca4cf4edc2a288fdcfabfe1cca3fcc5193e9aa82cb6058be" elsif OS.mac? && Hardware::CPU.arm? url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-arm64" - sha256 "c0c197be4c3ac274b79b9566db8c07af6ddbeb68d7a3134f9d2656c7fe9e628a" + sha256 "526b79786a4a99179474e1e20150ba956d7aba054f065c2b14ef6ca4ef43a6d8" elsif OS.linux? && Hardware::CPU.arm? url "https://github.com/knative/client/releases/download/#{v}/kn-linux-arm64" - sha256 "05498ba5e1acfa392dc29643ec184e062ae30b075c80e93a29fb2399510c5c07" + sha256 "51be6a84959a7eafcd57b8af9ce0831e32b7d730e6338f2ef16a189bd4d1403c" else url "https://github.com/knative/client/releases/download/#{v}/kn-linux-amd64" - sha256 "193389e757c56abcff0d3482a39f205f8ff92757458cdf11e865cbf7b2d02e67" + sha256 "e9c1dc399e2f5feddd6220a3a7a5c1537f709508ea99799a07d565a5ac08268f" end def install diff --git a/kn@1.16.rb b/kn@1.16.rb new file mode 100644 index 0000000..23eee60 --- /dev/null +++ b/kn@1.16.rb @@ -0,0 +1,42 @@ +# Generated through hack/update-codegen.sh. Don't edit manually. +# Next line is used to identify version of the file. +# kn_version:1.16.0 +require "fileutils" + +class KnAT116 < Formula + homepage "https://github.com/knative/client" + + v = "knative-v1.16.0" + version v + + if OS.mac? && Hardware::CPU.intel? + url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-amd64" + sha256 "5ce094218d753e34534caf35938f17b4ea0286d0c22413d2073c23990a97bd76" + elsif OS.mac? && Hardware::CPU.arm? + url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-arm64" + sha256 "c0c197be4c3ac274b79b9566db8c07af6ddbeb68d7a3134f9d2656c7fe9e628a" + elsif OS.linux? && Hardware::CPU.arm? + url "https://github.com/knative/client/releases/download/#{v}/kn-linux-arm64" + sha256 "05498ba5e1acfa392dc29643ec184e062ae30b075c80e93a29fb2399510c5c07" + else + url "https://github.com/knative/client/releases/download/#{v}/kn-linux-amd64" + sha256 "193389e757c56abcff0d3482a39f205f8ff92757458cdf11e865cbf7b2d02e67" + end + + def install + if OS.mac? && Hardware::CPU.intel? + FileUtils.mv("kn-darwin-amd64", "kn") + elsif OS.mac? && Hardware::CPU.arm? + FileUtils.mv("kn-darwin-arm64", "kn") + elsif OS.linux? && Hardware::CPU.arm? + FileUtils.mv("kn-linux-arm64", "kn") + else + FileUtils.mv("kn-linux-amd64", "kn") + end + bin.install "kn" + end + + test do + system "#{bin}/kn", "version" + end +end