22 lines
664 B
Ruby
22 lines
664 B
Ruby
|
class RancherCli < Formula
|
||
|
desc "The Rancher CLI is a unified tool to manage your Rancher server"
|
||
|
homepage "https://github.com/rancher/cli"
|
||
|
url "https://github.com/rancher/cli/archive/v0.0.1.tar.gz"
|
||
|
sha256 "3789da0f54d984c37b7805ec4066a336a25ffbaa46800c7f5023973ddf8444cf"
|
||
|
|
||
|
depends_on "go" => :build
|
||
|
|
||
|
def install
|
||
|
ENV["GOPATH"] = buildpath
|
||
|
(buildpath/"src/github.com/rancher/cli/").install Dir["*"]
|
||
|
system "go", "build", "-ldflags",
|
||
|
"-w -X github.com/rancher/cli/version.VERSION=#{version}",
|
||
|
"-o", "#{bin}/rancher",
|
||
|
"-v", "github.com/rancher/cli/"
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
system bin/"rancher", "help"
|
||
|
end
|
||
|
end
|