class Pulumi < Formula desc "Cloud native development platform" homepage "https://pulumi.io/" url "https://github.com/pulumi/pulumi.git", :tag => "v1.5.1", :revision => "69e04367a5772abab09eda5ad39367cd2e780af7" bottle do cellar :any_skip_relocation sha256 "2f9f8302f5a2c6efd1193f3661cc85bbbda7b6a301ab323d99bf21cae43a5286" => :catalina sha256 "d9159ffca790247683988e6acf910da07226fffe15a5267a6fdd2873ec829bbc" => :mojave sha256 "8f6f78e6aa8f29fde06919df9fa3b7f96e3284d28bb2eb1620c32a50cc3aea64" => :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