rke 0.1.10 (new formula)

Closes #32723.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
John Sockwell 2018-10-02 19:49:01 -04:00 committed by FX Coudert
parent 92a443abfa
commit 660ce32b02

26
Formula/rke.rb Normal file
View file

@ -0,0 +1,26 @@
class Rke < Formula
desc "Rancher Kubernetes Engine, a Kubernetes installer that works everywhere"
homepage "https://rancher.com/docs/rke/v0.1.x/en/"
url "https://github.com/rancher/rke.git",
:tag => "v0.1.10",
:revision => "22dc19205f794f19dc156d16695ff86c07a501e6"
depends_on "go" => :build
def install
ENV["GOPATH"] = buildpath
(buildpath/"src/github.com/rancher/rke").install buildpath.children
cd "src/github.com/rancher/rke" do
system "go", "build", "-ldflags",
"-w -X main.VERSION=v#{version}",
"-o", bin/"rke"
prefix.install_metafiles
end
end
test do
system bin/"rke", "config", "-e"
assert_predicate testpath/"cluster.yml", :exist?
end
end