-
-
Notifications
You must be signed in to change notification settings - Fork 12.3k
/
pulumi.rb
47 lines (39 loc) · 1.52 KB
/
pulumi.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
class Pulumi < Formula
desc "Cloud native development platform"
homepage "https://pulumi.io/"
url "https://github.com/pulumi/pulumi.git",
:tag => "v1.1.0",
:revision => "5af13f9a4f750c6ff3234dae6fedd0b6a0233e25"
bottle do
cellar :any_skip_relocation
sha256 "7cd1c76904035a58d82b85d30e363373ea825a4ecbf236b7593df0a25e59289a" => :mojave
sha256 "e69aae13649afee68dcd24ddd573907ef66648bbdada6f0df4db4c4a15b6ed44" => :high_sierra
sha256 "293106b3ae4fb25b74d1e2c3653a82f811bebd458eea3703f51ddeee20098040" => :sierra
end
depends_on "[email protected]" => :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:https://"
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