class Pulumi < Formula desc "Cloud native development platform" homepage "https://pulumi.io/" url "https://github.com/pulumi/pulumi.git", :tag => "v0.17.16", :revision => "e8a5acf1f28d6bd467a49fe6fb894c1e49db6cdd" bottle do cellar :any_skip_relocation sha256 "0a7b3dcf60906de81b38efc83d258a6a4e36ff89030ad520702e74d7053ce4ef" => :mojave sha256 "59e5ef398b09bae54f97966b69e4ad10e2484094647f513d42099a7f497ff793" => :high_sierra sha256 "bbc762b8b208e7b54cc3c93d0f22df4abebc1e15d08cf3a019f1cec4b2dba34d" => :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