46 lines
1.6 KiB
Ruby
46 lines
1.6 KiB
Ruby
class Pulumi < Formula
|
|
desc "Cloud native development platform"
|
|
homepage "https://pulumi.io/"
|
|
url "https://github.com/pulumi/pulumi/archive/v0.16.11.tar.gz"
|
|
sha256 "98c0bcc8bedc90a6ad55de0d70a8dfbdbe0f14a5cfb4998fb055d965ddab8257"
|
|
head "https://github.com/pulumi/pulumi.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "4500d02be90e90810437b789a7799267e497afc27db438528c0cf912a9c345a2" => :mojave
|
|
sha256 "0d2c9c7c58f33a141c5ec8c9a00b35a697ee39930c70a9f408dd89377a9ce078" => :high_sierra
|
|
sha256 "2a03f070d5ecab90010945350e758ff6231c356bdacc836f354242e6488b345d" => :sierra
|
|
end
|
|
|
|
depends_on "dep" => :build
|
|
depends_on "go" => :build
|
|
|
|
def install
|
|
ENV["GOPATH"] = buildpath
|
|
dir = buildpath/"src/github.com/pulumi/pulumi"
|
|
dir.install buildpath.children
|
|
|
|
cd dir do
|
|
system "dep", "ensure", "-vendor-only"
|
|
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
|