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

Update kn formula to new version #145

Merged
merged 1 commit into from
Apr 24, 2024
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
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.13.0
# kn_version:1.14.0
require "fileutils"

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

v = "knative-v1.13.0"
v = "knative-v1.14.0"
version v

if OS.mac? && Hardware::CPU.intel?
url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-amd64"
sha256 "3406ef887cd1e27df6d3f554e044ff6b6bcf2ac7b7c3c039370355bb4f960000"
sha256 "2f914e9900055b6b3300ade375699ed4c064ea38e840faf7c37785dc17fbe3be"
elsif OS.mac? && Hardware::CPU.arm?
url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-arm64"
sha256 "81d4d5fa701323894815b772bc5ef44c566c76b5a124296b0c53f1ac27c2bd96"
sha256 "8da5bcde9de0069b1e08159496008a76349fd2ceb6d455c754458c30b7852f8a"
elsif OS.linux? && Hardware::CPU.arm?
url "https://github.com/knative/client/releases/download/#{v}/kn-linux-arm64"
sha256 "de1f6747559fde68ca65a31903ab5f3b0cce7365a28cf997068bbbdaf92069f7"
sha256 "8ba679c4b5e2dc30e1000657216509266c549bfe5643142071806d00b9d04799"
else
url "https://github.com/knative/client/releases/download/#{v}/kn-linux-amd64"
sha256 "289eb39dfcb1c7d9b4976db039155347e8305fe484123a2e85c2d48fba751264"
sha256 "df33d4ed1323bfa20e84e046c13e0717e6e2a162e8a3c1b170d51d3b1d088b1c"
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.13.0
require "fileutils"

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

v = "knative-v1.13.0"
version v

if OS.mac? && Hardware::CPU.intel?
url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-amd64"
sha256 "3406ef887cd1e27df6d3f554e044ff6b6bcf2ac7b7c3c039370355bb4f960000"
elsif OS.mac? && Hardware::CPU.arm?
url "https://github.com/knative/client/releases/download/#{v}/kn-darwin-arm64"
sha256 "81d4d5fa701323894815b772bc5ef44c566c76b5a124296b0c53f1ac27c2bd96"
elsif OS.linux? && Hardware::CPU.arm?
url "https://github.com/knative/client/releases/download/#{v}/kn-linux-arm64"
sha256 "de1f6747559fde68ca65a31903ab5f3b0cce7365a28cf997068bbbdaf92069f7"
else
url "https://github.com/knative/client/releases/download/#{v}/kn-linux-amd64"
sha256 "289eb39dfcb1c7d9b4976db039155347e8305fe484123a2e85c2d48fba751264"
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