class Pulumi < Formula desc "Cloud native development platform" homepage "https://pulumi.io/" url "https://github.com/pulumi/pulumi.git", :tag => "v1.3.0", :revision => "7778d7ae8406374e004a1ac63d3dc5c98e996fc0" bottle do cellar :any_skip_relocation sha256 "ff1a56e4ef6955f3fab1088d3ed188e397369e5d1c4fc9ea789ad6e419c1a5d5" => :catalina sha256 "488d8b202c170dd7edbd48739eb1f3c3e2b472a168f84813bd4df080bee20ea9" => :mojave sha256 "dcff01990915407520e13b348d4a095dcdf4cf41f7b4d867233515cf23b36dcb" => :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