forked from bank-vaults/bank-vaults
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
57 lines (54 loc) · 1.95 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
# Requirements:
# - Docker
# - go install github.com/crazy-max/xgo@latest
builds:
# Building of Bank-Vaults is a bit hacky since the pkcs11 package can't be built with simple Go Crosscompiling
# so we need to use xgo, but that is not directly supported in GoReleaser, so we do the actual compilation with
# xgo in post hooks for all targets.
- id: bank-vaults
main: ./cmd/template
binary: bank-vaults
env:
- CGO_ENABLED=0
ldflags: "-s -w -X main.version={{ .Version }} -X main.commitHash={{ .ShortCommit }} -X main.buildDate={{ .Date }}"
goos:
- linux
- darwin
goarch:
- amd64
- arm64
hooks:
post:
- xgo -targets {{ .Os }}/{{ .Arch }} -dest dist -ldflags '-s -w -X main.version={{ .Version }} -X main.commitHash={{ .ShortCommit }} -X main.buildDate={{ .Date }}' -pkg cmd/bank-vaults .
- sudo bash -c "mkdir -p dist/bank-vaults_{{ .Os }}_{{ .Arch }}; mv dist/github.com/banzaicloud/bank-vaults-{{ .Os }}-{{ .Arch }} dist/bank-vaults_{{ .Os }}_{{ .Arch }}/bank-vaults"
- id: vault-env
main: ./cmd/vault-env
binary: vault-env
env:
- CGO_ENABLED=0
ldflags: "-s -w -X main.version={{ .Version }} -X main.commitHash={{ .ShortCommit }} -X main.buildDate={{ .Date }}"
goos:
- linux
- darwin
goarch:
- amd64
- arm64
archives:
- id: bank-vaults
name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}"
builds:
- bank-vaults
format_overrides:
- goos: windows
format: zip
- id: vault-env
name_template: "{{ .Binary }}-{{ .Os }}-{{ .Arch }}"
builds:
- vault-env
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "bank-vaults_checksums.txt"
changelog:
skip: false