-
Notifications
You must be signed in to change notification settings - Fork 13
/
.goreleaser.yml
202 lines (186 loc) · 6.26 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
version: 2
project_name: forwarder
before:
hooks:
- ./packaging/config.sh
- ./packaging/completions.sh
changelog:
use: github-native
source:
enabled: false
builds:
- main: ./cmd/forwarder
env:
- CGO_ENABLED=0
tags:
- dnshack
flags:
- -trimpath
ldflags:
- -checklinkname=0
- -extldflags '-static'
- -X 'github.com/saucelabs/forwarder/internal/version.Version={{ .Version }}'
- -X 'github.com/saucelabs/forwarder/internal/version.Time={{ .Date }}'
- -X 'github.com/saucelabs/forwarder/internal/version.Commit={{ .Commit }}'
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
universal_binaries:
- replace: true
checksum:
name_template: "checksums"
archives:
- name_template: >-
{{ .ProjectName }}-{{ .Version }}_{{ .Os }}.
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end }}
files:
- forwarder.yaml
- completions/*
- LICENSE
- LICENSE.3RD_PARTY
format: zip
format_overrides:
- goos: linux
format: tar.gz
brews:
- repository:
owner: saucelabs
name: homebrew-tap
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
commit_author:
name: "Sauce Connect Bot"
email: "[email protected]"
directory: Formula
goarm: "7"
homepage: https://forwarder-proxy.io
description: Forward MITM proxy with PAC support
license: MPL-2.0
test: |
system "#{bin}/forwarder version"
install: |-
bin.install "forwarder"
bash_completion.install "completions/forwarder.bash" => "forwarder"
zsh_completion.install "completions/forwarder.zsh" => "_forwarder"
fish_completion.install "completions/forwarder.fish"
# winget pushes commits to forwarder branch in our winget-pkgs fork.
# It is required to create a pull request to the upstream winget-pkgs repository
# after the release to get the package published.
winget:
- repository:
owner: saucelabs
name: winget-pkgs
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
branch: forwarder
commit_author:
name: "Sauce Connect Bot"
email: "[email protected]"
publisher: SauceLabs
publisher_url: https://saucelabs.com
short_description: Forward MITM proxy with PAC support
homepage: https://forwarder-proxy.io
license: MPL-2.0
nfpms:
- package_name: "{{ .ProjectName }}"
file_name_template: "{{ .ProjectName }}-{{ .Version }}_{{ .Os }}.{{ .Arch }}"
vendor: Sauce Labs
maintainer: "Sauce Connect Team"
description: "Sauce Labs Forwarder"
license: Mozilla Public License 2.0
formats:
- deb
- rpm
bindir: /usr/bin
contents:
- src: packaging/systemd/forwarder.service
dst: /usr/lib/systemd/system/forwarder.service
- src: packaging/forwarder.env
dst: /etc/default/forwarder
type: "config|noreplace"
- src: forwarder.yaml
dst: /etc/forwarder/forwarder.yaml
type: "config|noreplace"
- src: completions/forwarder.bash
dst: /usr/share/bash-completion/completions/forwarder
file_info:
mode: 0644
- src: completions/forwarder.fish
dst: /usr/share/fish/vendor_completions.d/forwarder.fish
file_info:
mode: 0644
- src: completions/forwarder.zsh
dst: /usr/share/zsh/vendor-completions/_forwarder
file_info:
mode: 0644
- src: LICENSE
dst: /usr/share/doc/forwarder/LICENSE
- src: LICENSE.3RD_PARTY
dst: /usr/share/doc/forwarder/LICENSE.3RD_PARTY
rpm:
group: Applications/Internet
compression: xz
overrides:
deb:
file_name_template: "{{ .ProjectName }}_{{ .Version }}.{{ .Os }}_{{ .Arch }}"
scripts:
preinstall: packaging/deb/forwarder.preinst
postinstall: packaging/deb/forwarder.postinst
preremove: packaging/deb/forwarder.prerm
postremove: packaging/deb/forwarder.postrm
rpm:
file_name_template: >-
{{ .ProjectName }}-{{ .Version }}_{{ .Os }}.
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "arm64" }}aarch64
{{- else }}{{ .Arch }}{{ end }}
scripts:
preinstall: packaging/rpm/forwarder.preinst
postinstall: packaging/rpm/forwarder.postinst
preremove: packaging/rpm/forwarder.prerm
postremove: packaging/rpm/forwarder.postrm
dockers:
- image_templates:
- "saucelabs/{{ .ProjectName }}:{{ if .IsSnapshot }}{{ .Tag }}{{ else }}{{ .Version }}{{ end }}-amd64"
use: buildx
goos: linux
goarch: amd64
build_flag_templates:
- "--platform=linux/amd64"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
dockerfile: Containerfile
extra_files:
- LICENSE
- LICENSE.3RD_PARTY
- image_templates:
- "saucelabs/{{ .ProjectName }}:{{ if .IsSnapshot }}{{ .Tag }}{{ else }}{{ .Version }}{{ end }}-arm64v8"
use: buildx
goos: linux
goarch: arm64
goarm: 8
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--label=org.opencontainers.image.created={{ .Date }}"
- "--label=org.opencontainers.image.title={{ .ProjectName }}"
- "--label=org.opencontainers.image.revision={{ .FullCommit }}"
- "--label=org.opencontainers.image.version={{ .Version }}"
dockerfile: Containerfile
extra_files:
- LICENSE
- LICENSE.3RD_PARTY
docker_manifests:
- name_template: "saucelabs/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}"
image_templates:
- "saucelabs/{{ .ProjectName }}:{{ if .IsSnapshot }}{{ .Tag }}{{ else }}{{ .Version }}{{ end }}-amd64"
- "saucelabs/{{ .ProjectName }}:{{ if .IsSnapshot }}{{ .Tag }}{{ else }}{{ .Version }}{{ end }}-arm64v8"
- name_template: "saucelabs/{{ .ProjectName }}:latest"
image_templates:
- "saucelabs/{{ .ProjectName }}:{{ if .IsSnapshot }}{{ .Tag }}{{ else }}{{ .Version }}{{ end }}-amd64"
- "saucelabs/{{ .ProjectName }}:{{ if .IsSnapshot }}{{ .Tag }}{{ else }}{{ .Version }}{{ end }}-arm64v8"