class Pulumi < Formula desc "Cloud native development platform" homepage "https://pulumi.io/" url "https://github.com/pulumi/pulumi.git", :tag => "v0.16.19", :revision => "0117c1c01d246c1a864e613c641c626efa04f7fb" bottle do cellar :any_skip_relocation sha256 "17c92a6d06435d472fde8bbe8b11f50faaca482236d512e65be6c01f86132ea4" => :mojave sha256 "0bb7a3816fbf04b14e136748a9b19eaf4ef71e5074c8aaaf5a22fec4f0117453" => :high_sierra sha256 "eb9cb14f3ae54a65628e155a8a48ad1e9d87c0a04cd911365b6a394d026b9d53" => :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