class Pulumi < Formula desc "Cloud native development platform" homepage "https://pulumi.io/" url "https://github.com/pulumi/pulumi.git", :tag => "v0.17.1", :revision => "d6d839608b2ed6f2b1db19ddf926bdce0802444b" bottle do cellar :any_skip_relocation sha256 "701b4391794027a0258ac2f61ba4a3597cfaffe4332c242587024b0c51c1c2d3" => :mojave sha256 "e312b8648d345702d944debebef824dead2bdfe797f8b4874a313505c9af4cc3" => :high_sierra sha256 "fc3bd63301b7bc077bde8d2cfc9be921a08209388000038fa91ff1831bde6665" => :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