47 lines
1.5 KiB
Ruby
47 lines
1.5 KiB
Ruby
class Pulumi < Formula
|
|
desc "Cloud native development platform"
|
|
homepage "https://pulumi.io/"
|
|
url "https://github.com/pulumi/pulumi.git",
|
|
:tag => "v1.5.0",
|
|
:revision => "3c832c33f5df665cbc775162e3c7fb6d305dbb5c"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "c7b8477d05108adfca12438f8dccfa160bddc2fb76ad22f8750d2aed95660bcb" => :catalina
|
|
sha256 "e9c5a637e923abb3aa860381e095f978a80cc7caba74d1fa13de6dfcfc1cef14" => :mojave
|
|
sha256 "760f69ca5be37158a403b779275de61910e975f741637d3c73237ec0951bfbab" => :high_sierra
|
|
end
|
|
|
|
depends_on "go@1.12" => :build
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
ENV["GO111MODULE"] = "on"
|
|
|
|
dir = buildpath/"src/github.com/pulumi/pulumi"
|
|
dir.install buildpath.children
|
|
|
|
cd dir do
|
|
system "go", "mod", "vendor"
|
|
system "make", "dist"
|
|
bin.install Dir["#{buildpath}/bin/*"]
|
|
prefix.install_metafiles
|
|
|
|
# Install bash completion
|
|
output = Utils.popen_read("#{bin}/pulumi gen-completion bash")
|
|
(bash_completion/"pulumi").write output
|
|
|
|
# Install zsh completion
|
|
output = Utils.popen_read("#{bin}/pulumi gen-completion zsh")
|
|
(zsh_completion/"_pulumi").write output
|
|
end
|
|
end
|
|
|
|
test do
|
|
ENV["PULUMI_ACCESS_TOKEN"] = "local://"
|
|
ENV["PULUMI_TEMPLATE_PATH"] = testpath/"templates"
|
|
system "#{bin}/pulumi", "new", "aws-typescript", "--generate-only",
|
|
"--force", "-y"
|
|
assert_predicate testpath/"Pulumi.yaml", :exist?, "Project was not created"
|
|
end
|
|
end
|