-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathgoreleaser.ts
370 lines (370 loc) · 11.5 KB
/
goreleaser.ts
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
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
const completionSpec: Fig.Spec = {
name: "goreleaser",
description: "Deliver Go binaries as fast and easily as possible",
subcommands: [
{
name: ["b", "build"],
description: "Builds the current project",
options: [
{
name: "--clean",
description: "Remove the dist folder before building",
},
{
name: ["--config", "-f"],
description: "Load configuration from file",
args: { name: "config", template: ["filepaths"] },
},
{
name: "--deprecated",
description: "Force print the deprecation message - tests only",
hidden: true,
},
{
name: "--id",
description: "Builds only the specified build ids",
isRepeatable: true,
args: { name: "id" },
},
{
name: ["--output", "-o"],
description:
"Copy the binary to the path after the build. Only taken into account when using --single-target and a single id (either with --id or if configuration only has one build)",
args: { name: "output", template: ["filepaths"] },
},
{
name: ["--parallelism", "-p"],
description:
"Amount tasks to run concurrently (default: number of CPUs)",
args: { name: "parallelism", default: "0" },
},
{
name: "--rm-dist",
description: "Remove the dist folder before building",
hidden: true,
},
{
name: "--single-target",
description:
"Builds only for current GOOS and GOARCH, regardless of what's set in the configuration file",
},
{
name: "--skip",
description:
"Skip the given options (valid options are: before, post-hooks, pre-hooks, validate)",
isRepeatable: true,
args: { name: "skip" },
},
{
name: "--skip-before",
description: "Skips global before hooks",
hidden: true,
},
{
name: "--skip-post-hooks",
description: "Skips all post-build hooks",
hidden: true,
},
{
name: "--skip-validate",
description: "Skips several sanity checks",
hidden: true,
},
{
name: "--snapshot",
description:
"Generate an unversioned snapshot build, skipping all validations",
},
{
name: "--timeout",
description: "Timeout to the entire build process",
args: { name: "timeout", default: "30m0s" },
},
],
},
{
name: ["c", "check"],
description: "Checks if configuration is valid",
options: [
{
name: ["--config", "-f"],
description: "Configuration file(s) to check",
hidden: true,
args: { name: "config", template: ["filepaths"] },
},
{
name: "--deprecated",
description: "Force print the deprecation message - tests only",
hidden: true,
},
{ name: ["--quiet", "-q"], description: "Quiet mode: no output" },
],
},
{
name: "completion",
description: "Generate the autocompletion script for the specified shell",
subcommands: [
{
name: "bash",
description: "Generate the autocompletion script for bash",
options: [
{
name: "--no-descriptions",
description: "Disable completion descriptions",
},
],
},
{
name: "fish",
description: "Generate the autocompletion script for fish",
options: [
{
name: "--no-descriptions",
description: "Disable completion descriptions",
},
],
},
{
name: "powershell",
description: "Generate the autocompletion script for powershell",
options: [
{
name: "--no-descriptions",
description: "Disable completion descriptions",
},
],
},
{
name: "zsh",
description: "Generate the autocompletion script for zsh",
options: [
{
name: "--no-descriptions",
description: "Disable completion descriptions",
},
],
},
],
},
{
name: ["hc", "healthcheck"],
description: "Checks if needed tools are installed",
options: [
{
name: ["--config", "-f"],
description: "Configuration file",
args: { name: "config", template: ["filepaths"] },
},
{ name: ["--quiet", "-q"], description: "Quiet mode: no output" },
],
},
{
name: ["i", "init"],
description: "Generates a .goreleaser.yaml file",
options: [
{
name: ["--config", "-f"],
description: "Load configuration from file",
args: {
name: "config",
default: ".goreleaser.yaml",
template: ["filepaths"],
},
},
],
},
{
name: ["schema", "jsonschema"],
description: "Outputs goreleaser's JSON schema",
options: [
{
name: ["--output", "-o"],
description: "Where to save the JSONSchema file",
args: { name: "output", default: "-", template: ["filepaths"] },
},
],
},
{
name: ["r", "release"],
description: "Releases the current project",
options: [
{
name: "--auto-snapshot",
description:
"Automatically sets --snapshot if the repository is dirty",
},
{ name: "--clean", description: "Removes the dist folder" },
{
name: ["--config", "-f"],
description: "Load configuration from file",
args: { name: "config", template: ["filepaths"] },
},
{
name: "--deprecated",
description: "Force print the deprecation message - tests only",
hidden: true,
},
{
name: "--fail-fast",
description:
"Whether to abort the release publishing on the first error",
},
{
name: ["--parallelism", "-p"],
description:
"Amount tasks to run concurrently (default: number of CPUs)",
args: { name: "parallelism", default: "0" },
},
{
name: "--release-footer",
description: "Load custom release notes footer from a markdown file",
args: { name: "release-footer", template: ["filepaths"] },
},
{
name: "--release-footer-tmpl",
description:
"Load custom release notes footer from a templated markdown file (overrides --release-footer)",
args: { name: "release-footer-tmpl", template: ["filepaths"] },
},
{
name: "--release-header",
description: "Load custom release notes header from a markdown file",
args: { name: "release-header", template: ["filepaths"] },
},
{
name: "--release-header-tmpl",
description:
"Load custom release notes header from a templated markdown file (overrides --release-header)",
args: { name: "release-header-tmpl", template: ["filepaths"] },
},
{
name: "--release-notes",
description:
"Load custom release notes from a markdown file (will skip GoReleaser changelog generation)",
args: { name: "release-notes", template: ["filepaths"] },
},
{
name: "--release-notes-tmpl",
description:
"Load custom release notes from a templated markdown file (overrides --release-notes)",
args: { name: "release-notes-tmpl", template: ["filepaths"] },
},
{
name: "--rm-dist",
description: "Removes the dist folder",
hidden: true,
},
{
name: "--skip",
description:
"Skip the given options (valid options are announce, aur, before, chocolatey, docker, homebrew, ko, nfpm, nix, publish, sbom, scoop, sign, snapcraft, validate, winget)",
isRepeatable: true,
args: { name: "skip" },
},
{
name: "--skip-announce",
description: "Skips announcing releases (implies --skip=validate)",
hidden: true,
},
{
name: "--skip-before",
description: "Skips global before hooks",
hidden: true,
},
{
name: "--skip-docker",
description: "Skips Docker Images/Manifests builds",
hidden: true,
},
{ name: "--skip-ko", description: "Skips Ko builds", hidden: true },
{
name: "--skip-publish",
description: "Skips publishing artifacts (implies --skip=announce)",
hidden: true,
},
{
name: "--skip-sbom",
description: "Skips cataloging artifacts",
hidden: true,
},
{
name: "--skip-sign",
description: "Skips signing artifacts",
hidden: true,
},
{
name: "--skip-validate",
description: "Skips git checks",
hidden: true,
},
{
name: "--snapshot",
description:
"Generate an unversioned snapshot release, skipping all validations and without publishing any artifacts (implies --skip=announce,publish,validate)",
},
{
name: "--timeout",
description: "Timeout to the entire release process",
args: { name: "timeout", default: "30m0s" },
},
],
},
{
name: "help",
description: "Help about any command",
subcommands: [
{ name: ["b", "build"], description: "Builds the current project" },
{
name: ["c", "check"],
description: "Checks if configuration is valid",
},
{
name: "completion",
description:
"Generate the autocompletion script for the specified shell",
subcommands: [
{
name: "bash",
description: "Generate the autocompletion script for bash",
},
{
name: "fish",
description: "Generate the autocompletion script for fish",
},
{
name: "powershell",
description: "Generate the autocompletion script for powershell",
},
{
name: "zsh",
description: "Generate the autocompletion script for zsh",
},
],
},
{
name: ["hc", "healthcheck"],
description: "Checks if needed tools are installed",
},
{
name: ["i", "init"],
description: "Generates a .goreleaser.yaml file",
},
{
name: ["schema", "jsonschema"],
description: "Outputs goreleaser's JSON schema",
},
{ name: ["r", "release"], description: "Releases the current project" },
],
},
],
options: [
{ name: "--debug", description: "Enable verbose mode", isPersistent: true },
{
name: "--verbose",
description: "Enable verbose mode",
isPersistent: true,
},
{ name: ["--help", "-h"], description: "Display help", isPersistent: true },
],
};
export default completionSpec;