-
Notifications
You must be signed in to change notification settings - Fork 1
/
.goreleaser.yml
74 lines (63 loc) · 2.5 KB
/
.goreleaser.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# all available options: https://goreleaser.com/customization/
version: 2
project_name: terraform-provider-cyberark
before:
hooks: []
builds:
- binary: terraform-provider-cyberark_v{{.Env.SECRETSHUB_VERSION}}
env:
- CGO_ENABLED=0
goos:
- darwin # MacOS
- windows
- linux
goarch:
- amd64
ldflags:
- '-s -w -X main.version={{.Env.SECRETSHUB_VERSION}} -X main.commit={{.Commit}}'
# Apple silicon support
- id: terraform-provider-cyberark-arm
binary: terraform-provider-cyberark_v{{.Env.SECRETSHUB_VERSION}}
env:
- CGO_ENABLED=0
goos:
- darwin # MacOS
goarch:
- arm64
ldflags:
- '-s -w -X main.version={{.Env.SECRETSHUB_VERSION}} -X main.commit={{.Commit}}'
archives:
- id: secretshub-terraform-release-archive
name_template: "{{ .ProjectName }}_{{ .Env.SECRETSHUB_VERSION }}_{{ .Os }}_{{ .Arch }}"
format: zip
files:
- README.md
- LICENSE
checksum:
name_template: "{{.ProjectName}}_{{.Env.SECRETSHUB_VERSION}}_SHA256SUMS"
brews:
- description: Terraform provider for Secretshub
homepage: https://github.com/cyberark/terraform-provider-cyberark
url_template: https://github.com/cyberark/terraform-provider-cyberark/releases/download/v{{.Env.SECRETSHUB_VERSION}}/{{.ProjectName}}_{{.Env.SECRETSHUB_VERSION}}_{{.Os}}_{{.Arch}}.zip
caveats: |
After installation, you must symlink the provider into Terraform's plugins directory.
Symlinking is necessary because Homebrew is sandboxed and cannot write to your home directory.
# Make the plugins directory if not present
mkdir -p ~/.terraform.d/plugins/
# Remove any old unversioned plugins (if applicable)
rm -f ~/.terraform.d/plugins/terraform-provider-cyberark
# Symlink the provider to your home dir. If Homebrew is installing somewhere other than /usr/local/Cellar, update the path as well.
ln -sf /usr/local/Cellar/terraform-provider-cyberark/{{.Env.SECRETSHUB_VERSION}}/bin/terraform-provider-cyberark_v{{.Env.SECRETSHUB_VERSION}} ~/.terraform.d/plugins/terraform-provider-cyberark_v{{.Env.SECRETSHUB_VERSION}}
dependencies:
- terraform
install: |
bin.install "terraform-provider-cyberark_v{{.Env.SECRETSHUB_VERSION}}"
test: |
# Running bin directly gives error, exit code 1
system "#{bin}/terraform-provider-cyberark_v{{.Env.SECRETSHUB_VERSION}}", "-h"
repository:
owner: cyberark
name: homebrew-tools
skip_upload: true
release:
disable: true