forked from enonic/cli-enonic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.goreleaser.yml
311 lines (248 loc) · 8.73 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
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
project_name: enonic
before:
hooks:
# you may remove this if you don't use vgo
# - go mod download
# you may remove this if you don't need go generate
# - go generate ./...
env_files:
github_token: ./configs/goreleaser.github.token
builds:
# You can have multiple builds defined as a yaml list
- # Path to main.go file or main package.
# Default is `.`.
main: ./internal/app/cli.go
# Name template for the binary final name.
# Default is the name of the project directory.
binary: enonic
# Custom environment variables to be set during the builds.
# Default is empty.
env:
- CGO_ENABLED=0
- GO111MODULE=on
# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are darwin and linux.
goos:
- linux
- darwin
- windows
# GOARCH to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are 386 and amd64.
goarch:
- amd64
- arm64
- arm
goarm:
- 6
# - 7
# windows_arm64 builds fail: exit status 2: # golang.org/x/sys/windows
#../../../.go/pkg/mod/golang.org/x/[email protected]/windows/zsyscall_windows.go:2833:38: undefined: WSAData
#../../../.go/pkg/mod/golang.org/x/[email protected]/windows/zsyscall_windows.go:3106:51: undefined: Servent
#../../../.go/pkg/mod/golang.org/x/[email protected]/windows/zsyscall_windows.go:3120:50: undefined: Servent
ignore:
- goos: windows
goarch: arm64
hooks:
post: ./script.sh
archives:
-
id: enonic
name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}64-bit
{{- else if eq .Arch "386" }}32-bit
{{- else if eq .Arch "darwin" }}Mac
{{- else }}{{ .Arch }}{{ end }}
{{- with .Arm }}_v{{ . }}{{ end }}
{{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
format: tar.gz # set to binary to omit archiving
format_overrides:
- goos: windows
format: zip
files:
- LICENSE.txt
- README.md
checksum:
name_template: 'checksums.txt'
snapshot:
version_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL.
github:
owner: enonic
name: cli-enonic
# If set to true, will not auto-publish the release.
# Default is false.
draft: false
# If set to true, will mark the release as not ready for production.
# Default is false.
prerelease: false
# You can change the name of the GitHub release.
# Default is ``
name_template: 'Enonic CLI {{ trimprefix .Version "v" }}'
# You can disable this pipe in order to not upload any artifacts to
# GitHub.
# Defaults to false.
# NB! Disabling this prevents brew/scoop pipes from working currently
# https://github.com/goreleaser/goreleaser/issues/1119
disable: false
scoops:
-
skip_upload: false
# Template for the url.
# Default is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
url_template: https://repo.enonic.com/public/com/enonic/cli/{{ .ProjectName }}/{{ .Version }}/{{ .ArtifactName }}
# Repository to push the app manifest to.
repository:
owner: enonic
name: cli-scoop
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
# Git author used to commit to the repository.
# Defaults are shown.
commit_author:
name: goreleaserbot
email: [email protected]
# Your app's homepage.
# Default is empty.
homepage: https://enonic.com/
# Your app's description.
# Default is empty.
description: Command-line interface for Enonic XP
# Your app's license
# Default is empty.
license: GPLv3
# Persist data between application updates
# persist:
# - "data"
# - "config.toml"
brews:
- skip_upload: false
# Repository to push the tap to.
repository:
owner: enonic
name: homebrew-cli
token: "{{ .Env.TAP_GITHUB_TOKEN }}"
# Template for the url.
# Default is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
url_template: https://repo.enonic.com/public/com/enonic/cli/{{ .ProjectName }}/{{ .Version }}/{{ .ArtifactName }}
# Allows you to set a custom download strategy.
# Default is empty.
# download_strategy: GitHubPrivateRepositoryReleaseDownloadStrategy
# Git author used to commit to the repository.
# Defaults are shown.
commit_author:
name: goreleaserbot
email: [email protected]
# Folder inside the repository to put the formula.
# Default is the root folder.
directory: Formula
# Your app's homepage.
# Default is empty.
homepage: https://enonic.com/
# Your app's description.
# Default is empty.
description: Command-line interface for Enonic XP
nfpms:
# You can change the name of the package.
# Default: `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
# - file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
- id: enonic
file_name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}64-bit
{{- else if eq .Arch "386" }}32-bit
{{- else if eq .Arch "darwin" }}Mac
{{- else }}{{ .Arch }}{{ end }}
{{- with .Arm }}_v{{ . }}{{ end }}
{{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
# Your app's vendor.
# Default is empty.
vendor: Enonic AS.
# Your app's homepage.
# Default is empty.
homepage: https://enonic.com/
# Your app's maintainer (probably you).
# Default is empty.
maintainer: Pavel Milkevich <[email protected]>
# Your app's description.
# Default is empty.
description: Command-line interface for Enonic XP
# Your app's license.
# Default is empty.
license: GPLv3
# Formats to be generated.
formats:
- deb
# - rpm // rpm-build not present on windows, uncomment if built on linux or osx (rpm-build should be installed)
snapcrafts:
# You can change the name of the package.
# Default: `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
# - name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
- id: enonic
name_template: >-
{{ .ProjectName }}_{{ .Version }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}64-bit
{{- else if eq .Arch "386" }}32-bit
{{- else if eq .Arch "darwin" }}Mac
{{- else }}{{ .Arch }}{{ end }}
{{- with .Arm }}_v{{ . }}{{ end }}
{{- if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}
# The name of the snap. This is optional.
# Default is project name.
name: enonic
# Wether to publish the snap to the snapcraft store.
# Remember you need to `snapcraft login` first.
# Defaults to false.
publish: true
# Single-line elevator pitch for your amazing snap.
# 79 char long at most.
summary: Command-line interface for Enonic XP
description: Tool for managing XP instances, home folders and projects
# A guardrail to prevent you from releasing a snap to all your users before
# it is ready.
# `devel` will let you release only to the `edge` and `beta` channels in the
# store. `stable` will let you release also to the `candidate` and `stable`
# channels. More info about channels here:
# https://snapcraft.io/docs/reference/channels
grade: stable
# Snaps can be setup to follow three different confinement policies:
# `strict`, `devmode` and `classic`. A strict confinement where the snap
# can only read and write in its own namespace is recommended. Extra
# permissions for strict snaps can be declared as `plugs` for the app, which
# are explained later. More info about confinement here:
# https://snapcraft.io/docs/reference/confinement
confinement: strict
base: core22
apps:
enonic:
plugs: [ "home", "network", "network-bind", "dot-enonic", "mount-observe" ]
plugs:
dot-enonic:
interface: personal-files
write:
- $HOME/.enonic
dot-gradle:
interface: personal-files
write:
- $HOME/.gradle
dot-m2:
interface: personal-files
read:
- $HOME/.m2
artifactories:
- name: repo
target: https://repo.enonic.com/public/com/enonic/cli/{{ .ProjectName }}/{{ .Version }}/