forked from cyberark/secretless-broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
145 lines (134 loc) · 4.42 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
project_name: secretless-broker
builds:
- &summon-2-build
id: summon2-linux
main: ./cmd/summon2/main.go
binary: summon2
env:
- CGO_ENABLED=1
# Tag 'netgo' is a Go build tag that ensures a pure Go networking stack
# in the resulting binary instead of using the default host's stack to
# ensure a fully statically-linked artifact that has no lib dependencies.
flags:
- -tags=netgo
goos:
- linux
goarch:
- amd64
# These flags generate a statically-linked artifact that allows the binary
# to run on any linux-based OS.
ldflags: -s -w -linkmode external -extldflags "-static"
- <<: *summon-2-build
id: summon2-darwin
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
goos:
- darwin
goarch:
- amd64
# Building for OSX with -extldflags "-static" results in the error:
# ld: library not found for -lcrt0.o
# This is because static builds are only possible if all libraries
# (including libgcc.a) have also been compiled with -static.
# A static version of crt0.o is not provided
# with the OSX SDK
ldflags: -s -w -linkmode external
- &secretless-broker-build
id: secretless-broker-linux
main: ./cmd/secretless-broker/main.go
binary: secretless-broker
env:
- CGO_ENABLED=1
# Tag 'netgo' is a Go build tag that ensures a pure Go networking stack
# in the resulting binary instead of using the default host's stack to
# ensure a fully static artifact that has no dependencies.
flags:
- -tags=netgo
goos:
- linux
goarch:
- amd64
# The `Tag` override is there to provide the git commit information in the
# final binary. See `Static long version tags` in the `Building` section
# of `CONTRIBUTING.md` for more information.
ldflags: -s -w -linkmode external -X "github.com/cyberark/secretless-broker/pkg/secretless.Tag={{ .ShortCommit }}" -extldflags "-static"
hooks:
post:
# Copy the binary out into the <dist> path, and give the copy the name we want
# in the release <extra_files>.
# e.g. Suppose a windows amd64 build generates a binary at
# path/to/secretless-broker.exe. This will be copied to
# path/to/../secretless-broker-windows_amd64.exe. The copy path can then be added to
# the release <extra_files> and will result in a release artifact with the name
# secretless-broker-windows_amd64.exe.
- cp "{{ .Path }}" "{{ dir .Path }}/../secretless-broker-{{.Target}}{{.Ext}}"
- <<: *secretless-broker-build
id: secretless-broker-darwin
env:
- CGO_ENABLED=1
- CC=o64-clang
- CXX=o64-clang++
goos:
- darwin
goarch:
- amd64
# Building for OSX with -extldflags "-static" results in the error:
# ld: library not found for -lcrt0.o
# This is because static builds are only possible if all libraries
# (including libgcc.a) have also been compiled with -static.
# A static version of crt0.o is not provided
# with the OSX SDK
ldflags: -s -w -linkmode external -X "github.com/cyberark/secretless-broker/pkg/secretless.Tag={{ .ShortCommit }}"
archives:
- id: secretless-release-archive
files:
- CHANGELOG.md
- NOTICES.txt
- LICENSE
- README.md
format_overrides:
- goos: windows
format: zip
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}_{{.Arch}}"
wrap_in_directory: true
checksum:
name_template: 'SHA256SUMS.txt'
dist: ./dist/goreleaser
brews:
- description: Secures your apps by making them Secretless
homepage: https://secretless.io
url_template: https://github.com/cyberark/secretless-broker/releases/download/v{{.Version}}/secretless-broker_{{.Version}}_{{.Os}}_{{.Arch}}.tar.gz
install: |
bin.install "secretless-broker"
test: |
system "#{bin}/secretless-broker", "-version"
github:
owner: cyberark
name: homebrew-tools
skip_upload: true
nfpms:
- bindir: /usr/bin
description: Secures your apps by making them Secretless
empty_folders:
- /usr/local/lib/secretless
formats:
- deb
- rpm
homepage: https://secretless.io
license: "Apache 2.0"
maintainer: CyberArk Maintainers <[email protected]>
file_name_template: "{{.ProjectName}}_{{.Version}}_{{.Arch}}"
vendor: CyberArk
snapshot:
name_template: "{{ .Tag }}-next"
release:
disable: false
draft: true
extra_files:
- glob: NOTICES.txt
- glob: LICENSE
- glob: CHANGELOG.md
- glob: dist/goreleaser/secretless-broker-linux_amd64
- glob: dist/goreleaser/secretless-broker-darwin_amd64