Skip to content

Commit

Permalink
Updating install location for quickstart plugin (#24)
Browse files Browse the repository at this point in the history
* updating install location to kn plugin directory

* adding symlink for plugin so that kn can find it without config
  • Loading branch information
psschwei authored Jul 23, 2021
1 parent f9cbe95 commit 8cad0e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions quickstart.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'fileutils'
require 'Dir'

class Quickstart < Formula
v = "v0.1.0"
Expand All @@ -20,15 +21,16 @@ class Quickstart < Formula
end

def install
FileUtils.mkdir_p(Dir.home + "/.config/kn/plugins")
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"
FileUtils.ln_s("kn-quickstart", Dir.home + "/.config/kn/plugins/kn-quickstart")
end

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

0 comments on commit 8cad0e8

Please sign in to comment.