Skip to content

Commit

Permalink
Update plugins to v1.11.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
dsimansk committed Jul 28, 2023
1 parent ea35067 commit 1ab37a1
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.10.0"
v = "v1.11.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 "a7a55c363a35eabc05f50159d436699e769a3892fb05c6fdd420eba79cf7e9ab"
sha256 "e0f4fd38135d399b9b51b073e7a3e15b7428e6d1a3b6e03effaf95c0df23753d"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "ad040536a6fda39d1605dc364f11b714d668ede4a7a385f06a6e89386f56e751"
sha256 "36a88a7f4d488ba2b7046087997429d406570b342d6f6797c4703f608cc243f6"
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 AdminAT110 < Formula
v = "v1.10.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 "a7a55c363a35eabc05f50159d436699e769a3892fb05c6fdd420eba79cf7e9ab"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "ad040536a6fda39d1605dc364f11b714d668ede4a7a385f06a6e89386f56e751"
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.10.0'
PLUGIN = Kn::Plugin::Event.new 'v1.11.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 EventAT110 < Formula
PLUGIN = Kn::Plugin::Event.new 'v1.10.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.10}
PREVIOUS_RELEASE=${PREVIOUS_RELEASE:-1.9}
CURRENT_RELEASE=${CURRENT_RELEASE:-1.11}
PREVIOUS_RELEASE=${PREVIOUS_RELEASE:-1.10}

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.10.0"
v = "v1.11.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 "1b3ff80c3d07a26b65fb551eaa76d0560841de13371fd40dc790ea67edf83468"
sha256 "0cc699ffd36dda8f5a85addc1eb3e32b864b1c9653f50e40560ef330ea5d59ce"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "6ab28b80fa584c2a99431974cacbd2fc5bc165eb35b31ef9d78219d69a02b010"
sha256 "6d5ab1c06e8fa3ae88b34c6b39469366d6e1dbd3626e0ce403bcae5ab63496ed"
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 QuickstartAT110 < Formula
v = "v1.10.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 "1b3ff80c3d07a26b65fb551eaa76d0560841de13371fd40dc790ea67edf83468"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "6ab28b80fa584c2a99431974cacbd2fc5bc165eb35b31ef9d78219d69a02b010"
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.10.0"
v = "v1.11.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 "a63f38f559422ca3407907dc7e157138a24e0087f34646e939342e6b25d657f3"
sha256 "149eee8a1ddf9752973c9fac2edc9e3d878dbc80b5c47e81cb3c56583038e013"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "a60b6f3458e151780343556aa8854ae39d441c4fc7de9d877f2709feed2a8f82"
sha256 "cbd882e10e1f2c8f6f6890a972b85e261db988c96625cfce2ebfed0d0e74af6b"
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 SourceKafkaAT110 < Formula
v = "v1.10.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 "a63f38f559422ca3407907dc7e157138a24e0087f34646e939342e6b25d657f3"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "a60b6f3458e151780343556aa8854ae39d441c4fc7de9d877f2709feed2a8f82"
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.10.0"
v = "v1.11.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 "435d16e73a1fc4825f767b02f31e155217741ffd614687c1f53eb9bd3ded6b61"
sha256 "3b9e3070d7f20f915bbd1a57c69abdd97e8f41177e2f66cbf7a0d03349ecd558"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "6da394621488a6fb07226699a1ef485260b1bdb47415d5add3b7755a99e42133"
sha256 "6ac36f61d08d20d41bdf6a49244c3c388951e3a02f03d2e5dad75b452efd30eb"
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 SourceKameletAT110 < Formula
v = "v1.10.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 "435d16e73a1fc4825f767b02f31e155217741ffd614687c1f53eb9bd3ded6b61"
else
url "#{base_url}/#{file_name}-linux-amd64"
sha256 "6da394621488a6fb07226699a1ef485260b1bdb47415d5add3b7755a99e42133"
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 1ab37a1

Please sign in to comment.