class Pulumi < Formula desc "Cloud native development platform" homepage "https://pulumi.io/" url "https://github.com/pulumi/pulumi.git", :tag => "v0.17.10", :revision => "2efde733b2f85d9764ac03ce649e2ecdf0d4694e" bottle do cellar :any_skip_relocation sha256 "f898d94b03122d9c32639c8254989c9ef47bdd4fa03800ae1caca96f0cefa705" => :mojave sha256 "3a7f3e53528686f391f41f258a59deb5abc51168362b42087cabf3353f78a9b0" => :high_sierra sha256 "ff7c20ec4647e227c21a7a2330890e2343fbdf604ea819ba9f52d63c237c57b4" => :sierra end depends_on "go" => :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