Skip to content

Commit

Permalink
Update kn formula to new version (#158)
Browse files Browse the repository at this point in the history
Co-authored-by: dsimansk <[email protected]>
  • Loading branch information
github-actions[bot] and dsimansk authored Oct 23, 2024
1 parent 544d293 commit 5be9eac
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kn.rb
Original file line number Diff line number Diff line change
@@ -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.15.0
# kn_version:1.16.0
require "fileutils"

class Kn < Formula
homepage "https://github.com/knative/client"

v = "knative-v1.15.0"
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 "d46ed86454c4197874d3d210fbf2dde11cd73ab91fc3dff51942b70ecec043fe"
sha256 "5ce094218d753e34534caf35938f17b4ea0286d0c22413d2073c23990a97bd76"
elsif OS.mac? && Hardware::CPU.arm?
url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-arm64"
sha256 "941bd29dfa8d4cde07094cb5e1a4d768db1becabbff4683eed76acb1b47bc883"
sha256 "c0c197be4c3ac274b79b9566db8c07af6ddbeb68d7a3134f9d2656c7fe9e628a"
elsif OS.linux? && Hardware::CPU.arm?
url "https://github.com/knative/client/releases/download/#{v}/kn-linux-arm64"
sha256 "292b4e03b86d43c61ca9ba80e9277f4391c7b9ee1b86a0cedcff35518ad668ef"
sha256 "05498ba5e1acfa392dc29643ec184e062ae30b075c80e93a29fb2399510c5c07"
else
url "https://github.com/knative/client/releases/download/#{v}/kn-linux-amd64"
sha256 "aa01d47d33b05d0e0b4705d3112fcfd95cbe06ca9d2ca3a38a85da67f60face7"
sha256 "193389e757c56abcff0d3482a39f205f8ff92757458cdf11e865cbf7b2d02e67"
end

def install
Expand Down
42 changes: 42 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -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.15.0
require "fileutils"

class KnAT115 < Formula
homepage "https://github.com/knative/client"

v = "knative-v1.15.0"
version v

if OS.mac? && Hardware::CPU.intel?
url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-amd64"
sha256 "d46ed86454c4197874d3d210fbf2dde11cd73ab91fc3dff51942b70ecec043fe"
elsif OS.mac? && Hardware::CPU.arm?
url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-arm64"
sha256 "941bd29dfa8d4cde07094cb5e1a4d768db1becabbff4683eed76acb1b47bc883"
elsif OS.linux? && Hardware::CPU.arm?
url "https://github.com/knative/client/releases/download/#{v}/kn-linux-arm64"
sha256 "292b4e03b86d43c61ca9ba80e9277f4391c7b9ee1b86a0cedcff35518ad668ef"
else
url "https://github.com/knative/client/releases/download/#{v}/kn-linux-amd64"
sha256 "aa01d47d33b05d0e0b4705d3112fcfd95cbe06ca9d2ca3a38a85da67f60face7"
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

0 comments on commit 5be9eac

Please sign in to comment.