Skip to content

Commit

Permalink
Update plugins to v1.14 release (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimansk authored May 3, 2024
1 parent 745a5c0 commit edc7066
Show file tree
Hide file tree
Showing 11 changed files with 176 additions and 15 deletions.
6 changes: 3 additions & 3 deletions admin.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'fileutils'

class Admin < Formula
v = "v1.13.0"
v = "v1.14.0"
plugin_name = "admin"
path_name = "kn-plugin-#{plugin_name}"
file_name = "kn-#{plugin_name}"
Expand All @@ -13,10 +13,10 @@ class Admin < Formula

if OS.mac?
url "#{base_url}/#{file_name}-darwin-amd64"
sha256 "f4d7419b070d04eba985de8f0c04648dad0b3c11b40b715d0d8dfda378a94c62"
sha256 "5d7450582b07ad0d825d6093bd9e1da716e0f4b8c553812db6f90385070504ce"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "c92e4932f5b317f2554f220fdb124fd8e84305286bcc4a03cf97bf27cdbec122"
sha256 "bd36720f3d965c4e8aa4d6034f29f802a685b2821041fc5e1a629ae1606fe56a"
end

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

class AdminAT113 < Formula
v = "v1.13.0"
plugin_name = "admin"
path_name = "kn-plugin-#{plugin_name}"
file_name = "kn-#{plugin_name}"
base_url = "https://github.com/knative-sandbox/#{path_name}/releases/download/knative-#{v}"

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

version v

if OS.mac?
url "#{base_url}/#{file_name}-darwin-amd64"
sha256 "f4d7419b070d04eba985de8f0c04648dad0b3c11b40b715d0d8dfda378a94c62"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "c92e4932f5b317f2554f220fdb124fd8e84305286bcc4a03cf97bf27cdbec122"
end

def install
if OS.mac?
FileUtils.mv("kn-admin-darwin-amd64", "kn-admin")
else
FileUtils.mv("kn-admin-linux-amd64", "kn-admin")
end
bin.install "kn-admin"
end

test do
system "#{bin}/kn-admin", "version"
end
end
2 changes: 1 addition & 1 deletion event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require_relative 'kn/plugin/event'

class Event < Formula
PLUGIN = Kn::Plugin::Event.new 'v1.13.0'
PLUGIN = Kn::Plugin::Event.new 'v1.14.0'

homepage PLUGIN.homepage
version PLUGIN.version
Expand Down
24 changes: 24 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require 'fileutils'
require 'json'

require_relative 'kn/plugin/event'

class EventAT113 < Formula
PLUGIN = Kn::Plugin::Event.new 'v1.13.0'

homepage PLUGIN.homepage
version PLUGIN.version
url PLUGIN.url
sha256 PLUGIN.sha256

def install
FileUtils.mv(PLUGIN.source_bin, PLUGIN.target_bin)
bin.install PLUGIN.target_bin
end

test do
json = shell_output("#{bin}/#{PLUGIN.target_bin} version -o json").strip
version_info = JSON.parse(json)
assert_equal PLUGIN.version, version_info['version']
end
end
4 changes: 2 additions & 2 deletions hack/update-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
set -e

PLUGINS=("admin" "event" "quickstart" "source-kafka" "source-kamelet")
CURRENT_RELEASE=${CURRENT_RELEASE:-1.13}
PREVIOUS_RELEASE=${PREVIOUS_RELEASE:-1.12}
CURRENT_RELEASE=${CURRENT_RELEASE:-1.14}
PREVIOUS_RELEASE=${PREVIOUS_RELEASE:-1.13}

for plugin in "${PLUGINS[@]}"; do

Expand Down
6 changes: 3 additions & 3 deletions quickstart.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'fileutils'

class Quickstart < Formula
v = "v1.13.0"
v = "v1.14.0"
plugin_name = "quickstart"
path_name = "kn-plugin-#{plugin_name}"
file_name = "kn-#{plugin_name}"
Expand All @@ -13,10 +13,10 @@ class Quickstart < Formula

if OS.mac?
url "#{base_url}/#{file_name}-darwin-amd64"
sha256 "a813bef5dfc121527c6ebb6acb7e4d931fb08665b6d26964b05f630767c5f23e"
sha256 "a5fa85cf3b5a01ddb9c62800d27c30f9beee2dd30dc659b8ae7f169862777767"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "855203552b0115c92fd37f801397df642972cbad6b523414b7845b5c097f695c"
sha256 "723f0369a7a90331b9234fab5349be86e89a5fd6a0a459abbe5f1ee7db2d997c"
end

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

class QuickstartAT113 < Formula
v = "v1.13.0"
plugin_name = "quickstart"
path_name = "kn-plugin-#{plugin_name}"
file_name = "kn-#{plugin_name}"
base_url = "https://github.com/knative-sandbox/#{path_name}/releases/download/knative-#{v}"

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

version v

if OS.mac?
url "#{base_url}/#{file_name}-darwin-amd64"
sha256 "a813bef5dfc121527c6ebb6acb7e4d931fb08665b6d26964b05f630767c5f23e"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "855203552b0115c92fd37f801397df642972cbad6b523414b7845b5c097f695c"
end

def install
if OS.mac?
FileUtils.mv("kn-quickstart-darwin-amd64", "kn-quickstart")
else
FileUtils.mv("kn-quickstart-linux-amd64", "kn-quickstart")
end
bin.install "kn-quickstart"
end

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

6 changes: 3 additions & 3 deletions source-kafka.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'fileutils'

class SourceKafka < Formula
v = "v1.13.0"
v = "v1.14.0"
plugin_name = "source-kafka"
path_name = "kn-plugin-#{plugin_name}"
file_name = "kn-#{plugin_name}"
Expand All @@ -13,10 +13,10 @@ class SourceKafka < Formula

if OS.mac?
url "#{base_url}/#{file_name}-darwin-amd64"
sha256 "ee03c9c20694139d9db07206aebaf11bb0e85bb3bed1e3360830343541c6076e"
sha256 "ea465a8d42c103395bfc6542d1eb022424a20774446c2a6dbe43b83f1e61b7d2"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "e7d55573d284c219e4f54d791fd620657bcdb57711c06b527ebda3f79c783412"
sha256 "13174d105897eea0524d3e44ec76aedb8ebf49d56a37140062d22c07b420c366"
end

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

class SourceKafkaAT113 < Formula
v = "v1.13.0"
plugin_name = "source-kafka"
path_name = "kn-plugin-#{plugin_name}"
file_name = "kn-#{plugin_name}"
base_url = "https://github.com/knative-sandbox/#{path_name}/releases/download/knative-#{v}"

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

version v

if OS.mac?
url "#{base_url}/#{file_name}-darwin-amd64"
sha256 "ee03c9c20694139d9db07206aebaf11bb0e85bb3bed1e3360830343541c6076e"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "e7d55573d284c219e4f54d791fd620657bcdb57711c06b527ebda3f79c783412"
end

def install
if OS.mac?
FileUtils.mv("kn-source-kafka-darwin-amd64", "kn-source-kafka")
else
FileUtils.mv("kn-source-kafka-linux-amd64", "kn-source-kafka")
end
bin.install "kn-source-kafka"
end

test do
system "#{bin}/kn-source-kafka", "version"
end
end
6 changes: 3 additions & 3 deletions source-kamelet.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'fileutils'

class SourceKamelet < Formula
v = "v1.13.0"
v = "v1.14.0"
plugin_name = "source-kamelet"
path_name = "kn-plugin-#{plugin_name}"
file_name = "kn-#{plugin_name}"
Expand All @@ -13,10 +13,10 @@ class SourceKamelet < Formula

if OS.mac?
url "#{base_url}/#{file_name}-darwin-amd64"
sha256 "5e62c59942a35de80725b0de07b246993fb40024e1327295fd4b81b7d011eb84"
sha256 "055db315e0c1ef326d57ef95ef4cc85cde056fc0d1c2289266d0c501e8c793f5"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "62bbde01fc949edc9f7ed41b69a0c7c3b1c10f9de5e4577754955e8de5eb9be4"
sha256 "a995e7a1b6c0a0304e8ac1f645b53a31db465b52a48d91fa89db1b3bcfa30487"
end

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

class SourceKameletAT113 < Formula
v = "v1.13.0"
plugin_name = "source-kamelet"
path_name = "kn-plugin-#{plugin_name}"
file_name = "kn-#{plugin_name}"
base_url = "https://github.com/knative-sandbox/#{path_name}/releases/download/knative-#{v}"

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

version v

if OS.mac?
url "#{base_url}/#{file_name}-darwin-amd64"
sha256 "5e62c59942a35de80725b0de07b246993fb40024e1327295fd4b81b7d011eb84"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "62bbde01fc949edc9f7ed41b69a0c7c3b1c10f9de5e4577754955e8de5eb9be4"
end

def install
if OS.mac?
FileUtils.mv("kn-source-kamelet-darwin-amd64", "kn-source-kamelet")
else
FileUtils.mv("kn-source-kamelet-linux-amd64", "kn-source-kamelet")
end
bin.install "kn-source-kamelet"
end

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

0 comments on commit edc7066

Please sign in to comment.