-
Notifications
You must be signed in to change notification settings - Fork 0
/
terraform-provider-artifactory.rb
53 lines (40 loc) · 1.43 KB
/
terraform-provider-artifactory.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
48
49
50
51
52
53
require "language/go"
class TerraformProviderArtifactory < Formula
desc "Manage Artifactory with Terraform"
homepage "https://github.com/webdevwilson/terraform-provider-artifactory"
version "1.0.1"
depends_on "go" => :build
depends_on "terraform"
depends_on "drewsonne/tap/tf-install-provider"
url "https://github.com/webdevwilson/terraform-provider-artifactory.git",
:revision => "a503e6f0d3656d0120be27b410f8cbaca88fa32e"
head "https://github.com/webdevwilson/terraform-provider-artifactory.git",
:shallow => false
go_resource "github.com/hashicorp/terraform" do
url "https://github.com/hashicorp/terraform.git",
:revision => "3db35024878484508795a3eddb2fda29f83eb5d9"
end
def install
ENV["GOPATH"] = buildpath
ENV.prepend_create_path "PATH", buildpath/"bin"
dir = buildpath/"src/github.com/webdevwilson/terraform-provider-artifactory"
dir.install buildpath.children - [buildpath/".brew_home"]
Language::Go.stage_deps resources, buildpath/"src"
cd "src/github.com/hashicorp/terraform" do
system "go", "install"
end
cd dir do
system "go build"
bin.install "terraform-provider-artifactory"
end
end
test do
system "#{bin}/terraform-provider-artifactory; [[ $? -eq 1 ]]"
end
def caveats
"""
After installing, you will need to copy the provider to a place terraform can find it by running:
tf-install-provider artifactory
"""
end
end