-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
176 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |