operator-sdk 0.5.0 (new formula)
Closes #37826. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
b83b440d7d
commit
f5ba12512a
1 changed files with 43 additions and 0 deletions
43
Formula/operator-sdk.rb
Normal file
43
Formula/operator-sdk.rb
Normal file
|
@ -0,0 +1,43 @@
|
|||
class OperatorSdk < Formula
|
||||
desc "SDK for building Kubernetes applications"
|
||||
homepage "https://coreos.com/operators/"
|
||||
url "https://github.com/operator-framework/operator-sdk/archive/v0.5.0.tar.gz"
|
||||
sha256 "2da85ed4d69da11344d935578cdd19ede0525804f66572081c53985e5a32c890"
|
||||
head "https://github.com/operator-framework/operator-sdk.git"
|
||||
|
||||
depends_on "dep"
|
||||
depends_on "go"
|
||||
|
||||
def install
|
||||
ENV["GOPATH"] = buildpath
|
||||
dir = buildpath/"src/github.com/operator-framework/operator-sdk"
|
||||
dir.install buildpath.children - [buildpath/".brew_home"]
|
||||
|
||||
cd dir do
|
||||
# Make binary
|
||||
system "make", "install"
|
||||
bin.install buildpath/"bin/operator-sdk"
|
||||
|
||||
# Install bash completion
|
||||
output = Utils.popen_read("#{bin}/operator-sdk completion bash")
|
||||
(bash_completion/"operator-sdk").write output
|
||||
|
||||
# Install zsh completion
|
||||
output = Utils.popen_read("#{bin}/operator-sdk completion zsh")
|
||||
(zsh_completion/"_operator-sdk").write output
|
||||
|
||||
prefix.install_metafiles
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
ENV["GOPATH"] = testpath
|
||||
dir = testpath/"src/example.com/test-operator"
|
||||
dir.mkpath
|
||||
|
||||
cd dir do
|
||||
# Create a new, blank operator framework
|
||||
system "#{bin}/operator-sdk", "new", "test"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue