-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
354 lines (325 loc) · 8.6 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
##### BUILDS ######
builds:
- id: ddev
# Requires make darwin_amd64 darwin_arm64 linux_amd64 linux_arm64 windows_amd64 mkcert
builder: prebuilt
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
goamd64:
- v1
ignore:
- goos: windows
goarch: arm64
prebuilt:
path: .gotmp/bin/{{.Os}}_{{.Arch}}/ddev{{.Ext}}
binary: ddev
- id: mkcert
# requires make completions
builder: prebuilt
goos:
- linux
- darwin
- windows
goarch:
- arm64
- amd64
goamd64:
- v1
ignore:
- goos: windows
goarch: arm64
prebuilt:
path: .gotmp/bin/{{.Os}}_{{.Arch}}/mkcert{{.Ext}}
binary: mkcert
- id: completions-tarball
# requires make completions
builder: prebuilt
goos:
- linux
goarch:
- arm64
prebuilt:
path: .gotmp/bin/completions.tar.gz
binary: completions.tar.gz
- id: ddev_bash_completion.sh
# requires make completions
builder: prebuilt
goos:
- linux
- darwin
- windows
goarch:
- arm64
- amd64
goamd64:
- v1
ignore:
- goos: windows
goarch: arm64
prebuilt:
path: .gotmp/bin/completions/ddev_bash_completion.sh
binary: ddev_bash_completion.sh
- id: ddev_zsh_completion.sh
# requires make completions
builder: prebuilt
goos:
- linux
- darwin
- windows
goarch:
- arm64
- amd64
goamd64:
- v1
ignore:
- goos: windows
goarch: arm64
prebuilt:
path: .gotmp/bin/completions/ddev_zsh_completion.sh
binary: ddev_zsh_completion.sh
- id: ddev_fish_completion.sh
# requires make completions
builder: prebuilt
goos:
- linux
- darwin
- windows
goarch:
- arm64
- amd64
goamd64:
- v1
ignore:
- goos: windows
goarch: arm64
prebuilt:
path: .gotmp/bin/completions/ddev_fish_completion.sh
binary: ddev_fish_completion.sh
- id: ddev-windows-installer
builder: prebuilt
goos:
- windows
goarch:
- amd64
goamd64:
- v1
prebuilt:
path: .gotmp/bin/windows_amd64/ddev_windows_installer.exe
binary: ddev-windows-installer
###### Archives ######
archives:
- id: ddev
builds:
- ddev
- mkcert
- ddev_bash_completion.sh
- ddev_zsh_completion.sh
- ddev_fish_completion.sh
format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Os }}-{{ .Arch }}.v{{ .Version }}"
replacements:
darwin: macos
format_overrides:
- goos: windows
format: zip
wrap_in_directory: false
files:
- LICENSE
allow_different_binary_count: true
- id: completions-tarball
builds:
- completions-tarball
format: binary
name_template: ddev_shell_completion_scripts.v{{.Version}}.tar.gz
- id: ddev-windows-installer
builds:
- ddev-windows-installer
format: binary
name_template: "ddev_windows_installer.v{{.Version}}"
checksum:
name_template: "checksums.txt"
#### RELEASE ####
release:
prerelease: auto
github:
owner: "{{ .Env.GITHUB_REPOSITORY_OWNER }}"
name: ddev
brews:
- name: ddev
ids:
- ddev
tap:
owner: "{{ .Env.GITHUB_REPOSITORY_OWNER }}"
name: homebrew-ddev
description: DDEV
folder: Formula
homepage: https://github.com/ddev/ddev
license: "Apache 2"
# ddev brew will only be uploaded on non-prerelease
skip_upload: auto
dependencies:
- name: mkcert
custom_block: |
head "https://github.com/ddev/ddev.git", branch: "master"
depends_on "go" => :build
depends_on "make" => :build
install: |
if build.head?
os = OS.mac? ? "darwin" : "linux"
arch = Hardware::CPU.arm? ? "arm64" : "amd64"
system "mkdir", "-p", "#{bin}"
system "make", "VERSION=v#{version}", "COMMIT=v#{version}"
system "cp", ".gotmp/bin/" + os + "_" + arch + "/ddev", "#{bin}/ddev"
else
bin.install "ddev"
bash_completion.install "ddev_bash_completion.sh" => "ddev"
zsh_completion.install "ddev_zsh_completion.sh" => "ddev"
fish_completion.install "ddev_fish_completion.sh" => "ddev"
end
test: |
system "#{bin}/ddev --version"
- name: ddev
ids:
- ddev
tap:
owner: "{{ .Env.GITHUB_REPOSITORY_OWNER }}"
name: homebrew-ddev-edge
description: DDEV
folder: Formula
homepage: https://github.com/ddev/ddev
license: "Apache 2"
# ddev-edge brew will always be uploaded
skip_upload: "false"
dependencies:
- name: mkcert
custom_block: |
head "https://github.com/ddev/ddev.git", branch: "master"
depends_on "go" => :build
depends_on "make" => :build
install: |
if build.head?
os = OS.mac? ? "darwin" : "linux"
arch = Hardware::CPU.arm? ? "arm64" : "amd64"
system "mkdir", "-p", "#{bin}"
system "make", "VERSION=v#{version}", "COMMIT=v#{version}"
system "cp", ".gotmp/bin/" + os + "_" + arch + "/ddev", "#{bin}/ddev"
else
bin.install "ddev"
bash_completion.install "ddev_bash_completion.sh" => "ddev"
zsh_completion.install "ddev_zsh_completion.sh" => "ddev"
fish_completion.install "ddev_fish_completion.sh" => "ddev"
end
test: |
system "#{bin}/ddev --version"
nfpms:
- maintainer: Randy Fay
license: "Apache 2"
homepage: https://github.com/ddev/ddev
description: |
Open-source local web development tool
formats:
- deb
- rpm
contents:
- src: .gotmp/bin/completions/ddev_bash_completion.sh
dst: /usr/share/bash-completion/completions/ddev
file_info:
mode: 0644
- src: .gotmp/bin/completions/ddev_fish_completion.sh
dst: /usr/share/fish/completions/ddev.fish
file_info:
mode: 0644
- src: .gotmp/bin/completions/ddev_zsh_completion.sh
dst: /usr/share/zsh/vendor-completions/_ddev
file_info:
mode: 0644
suggests:
- bash-completion
- zsh-completions
overrides:
deb:
dependencies:
- libnss3-tools
- xdg-utils
replaces:
- mkcert
rpm:
dependencies:
- nss-tools
- xdg-utils
snapshot:
name_template: '{{ .Version }}-{{.ShortCommit}}'
aurs:
- name: "ddev"
ids:
- ddev
homepage: "https://github.com/ddev/ddev"
description: "DDEV: a local web development environment"
maintainers:
- 'Randy Fay <randy at randyfay.com>'
license: "Apache 2"
# main ddev repo will only be uploaded on non-prerelease
skip_upload: auto
private_key: '{{ .Env.AUR_SSH_PRIVATE_KEY }}'
# AUR_EDGE_GIT_URL should be something like ssh://[email protected]/ddev-bin.git or ssh://[email protected]/rfay-test-ddev-bin.git
git_url: '{{ .Env.AUR_STABLE_GIT_URL }}'
depends:
- docker
optdepends:
- 'bash-completion: subcommand completion support'
package: |-
# bin
install -Dm755 "./ddev" "${pkgdir}/usr/bin/ddev"
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/ddev/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm644 "./ddev_bash_completion.sh" "${pkgdir}/usr/share/bash-completion/completions/ddev"
install -Dm644 "./ddev_zsh_completion.sh" "${pkgdir}/usr/share/zsh/site-functions/_ddev"
install -Dm644 "./ddev_fish_completion.sh" "${pkgdir}/usr/share/fish/vendor_completions.d/ddev.fish"
# Git author used to commit to the repository.
# Defaults are shown below.
commit_author:
name: Randy Fay
email: [email protected]
- name: "ddev-edge"
ids:
- ddev
homepage: "https://github.com/ddev/ddev"
description: "DDEV: a local web development environment (edge)"
maintainers:
- 'Randy Fay <randy at randyfay.com>'
license: "Apache 2"
# Always upload, even on prerelease
skip_upload: "false"
private_key: '{{ .Env.AUR_SSH_PRIVATE_KEY }}'
# AUR_EDGE_GIT_URL should be something like ssh://[email protected]/ddev-edge-bin.git or ssh://[email protected]/rfay-test-ddev-edge-bin.git
git_url: '{{ .Env.AUR_EDGE_GIT_URL }}'
depends:
- docker
optdepends:
- 'bash-completion: subcommand completion support'
package: |-
# bin
install -Dm755 "./ddev" "${pkgdir}/usr/bin/ddev"
install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/ddev/LICENSE"
# completions
mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
install -Dm644 "./ddev_bash_completion.sh" "${pkgdir}/usr/share/bash-completion/completions/ddev"
install -Dm644 "./ddev_zsh_completion.sh" "${pkgdir}/usr/share/zsh/site-functions/_ddev"
install -Dm644 "./ddev_fish_completion.sh" "${pkgdir}/usr/share/fish/vendor_completions.d/ddev.fish"
# Git author used to commit to the repository.
# Defaults are shown below.
commit_author:
name: Randy Fay
email: [email protected]
furies:
- account: "{{ .Env.FURY_ACCOUNT }}"