forked from bank-vaults/bank-vaults
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
60 lines (57 loc) · 2.07 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
# 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:
# TODO
# This would be better if it could be ./cmd/bank-vaults instead of github.com/banzaicloud/bank-vaults/cmd/bank-vaults
# Since this is pulling the source code directly from GitHub so what we would like to build has to be pushed there first
- xgo --targets={{ .Os }}/{{ .Arch }} --dest=dist github.com/banzaicloud/bank-vaults/cmd/bank-vaults
- bash -c "mv dist/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