forked from eclipse-kanto/kanto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yaml
435 lines (434 loc) · 12.4 KB
/
.goreleaser.yaml
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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
env:
- GO111MODULE=on
- CGO_ENABLED=0
builds:
# suite-connector builds
- id: build-suite-connector
dir: ./build-tmp/suite-connector
main: ./cmd/connector
binary: suite-connector/suite-connector
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
flags:
- -mod=readonly
- -v
- -trimpath
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
ldflags:
- -s -w -X main.version={{ .Version }}
mod_timestamp: '{{ .CommitTimestamp }}'
- id: build-suite-connector-deb
dir: ./build-tmp/suite-connector
main: ./cmd/connector
binary: suite-connector
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
flags:
- -mod=readonly
- -v
- -trimpath
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
ldflags:
- -s -w -X main.version={{ .Version }}
mod_timestamp: '{{ .CommitTimestamp }}'
# container-management builds
- id: build-container-management
dir: ./build-tmp/container-management
main: ./containerm/daemon
binary: container-management/container-management
env:
- VERSION_PKG=github.com/eclipse-kanto/container-management/containerm
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
flags:
- -mod=readonly
- -v
- -trimpath
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
ldflags:
- -s -w -X {{ .Env.VERSION_PKG }}/version.GitCommit={{ .ShortCommit }} -X {{ .Env.VERSION_PKG }}/version.ProjectVersion={{ .Version }} -X {{ .Env.VERSION_PKG }}/version.APIVersion={{ .Version }} -X {{ .Env.VERSION_PKG }}/version.BuildTime={{ .Date }}
mod_timestamp: '{{ .CommitTimestamp }}'
- id: build-container-management-cli
dir: ./build-tmp/container-management
main: ./containerm/cli
binary: container-management/kanto-cm
env:
- VERSION_PKG=github.com/eclipse-kanto/container-management/containerm
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
flags:
- -mod=readonly
- -v
- -trimpath
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
ldflags:
- -s -w -X {{ .Env.VERSION_PKG }}/version.GitCommit={{ .ShortCommit }} -X {{ .Env.VERSION_PKG }}/version.ProjectVersion={{ .Version }} -X {{ .Env.VERSION_PKG }}/version.APIVersion={{ .Version }} -X {{ .Env.VERSION_PKG }}/version.BuildTime={{ .Date }}
mod_timestamp: '{{ .CommitTimestamp }}'
- id: build-container-management-deb
dir: ./build-tmp/container-management
main: ./containerm/daemon
binary: container-management
env:
- VERSION_PKG=github.com/eclipse-kanto/container-management/containerm
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
flags:
- -mod=readonly
- -v
- -trimpath
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
ldflags:
- -s -w -X {{ .Env.VERSION_PKG }}/version.GitCommit={{ .ShortCommit }} -X {{ .Env.VERSION_PKG }}/version.ProjectVersion={{ .Version }} -X {{ .Env.VERSION_PKG }}/version.APIVersion={{ .Version }} -X {{ .Env.VERSION_PKG }}/version.BuildTime={{ .Date }}
mod_timestamp: '{{ .CommitTimestamp }}'
- id: build-container-management-cli-deb
dir: ./build-tmp/container-management
main: ./containerm/cli
binary: kanto-cm
env:
- VERSION_PKG=github.com/eclipse-kanto/container-management/containerm
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
flags:
- -mod=readonly
- -v
- -trimpath
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
ldflags:
- -s -w -X {{ .Env.VERSION_PKG }}/version.GitCommit={{ .ShortCommit }} -X {{ .Env.VERSION_PKG }}/version.ProjectVersion={{ .Version }} -X {{ .Env.VERSION_PKG }}/version.APIVersion={{ .Version }} -X {{ .Env.VERSION_PKG }}/version.BuildTime={{ .Date }}
mod_timestamp: '{{ .CommitTimestamp }}'
# file-upload builds
- id: build-file-upload
dir: ./build-tmp/file-upload
main: ./
binary: file-upload/file-upload
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
flags:
- -mod=readonly
- -v
- -trimpath
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
ldflags:
- -s -w -X main.version={{ .Version }}
mod_timestamp: '{{ .CommitTimestamp }}'
- id: build-file-upload-deb
dir: ./build-tmp/file-upload
main: ./
binary: file-upload
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
flags:
- -mod=readonly
- -v
- -trimpath
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
ldflags:
- -s -w -X main.version={{ .Version }}
mod_timestamp: '{{ .CommitTimestamp }}'
# software-update builds
- id: build-software-update
dir: ./build-tmp/software-update
main: ./cmd/software-update
binary: software-update/software-update
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
flags:
- -mod=readonly
- -v
- -trimpath
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
ldflags:
- -s -w -X main.version={{ .Version }}
mod_timestamp: '{{ .CommitTimestamp }}'
- id: build-software-update-deb
dir: ./build-tmp/software-update
main: ./cmd/software-update
binary: software-update
goos:
- linux
goarch:
- amd64
- arm
- arm64
goarm:
- 7
flags:
- -mod=readonly
- -v
- -trimpath
asmflags:
- all=-trimpath={{ .Env.GOPATH }}
gcflags:
- all=-trimpath={{ .Env.GOPATH }}
ldflags:
- -s -w -X main.version={{ .Version }}
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- id: kanto-archive-all
builds:
- build-suite-connector
- build-container-management
- build-container-management-cli
- build-file-upload
- build-software-update
replacements:
amd64: x86_64
files:
# common files
- LICENSE
# suite-connector additional files
- src: ./build-tmp/suite-connector/NOTICE.md
dst: suite-connector
strip_parent: true
info:
mode: 0644
- src: ./build-tmp/suite-connector/cmd/connector/iothub.crt
dst: suite-connector
strip_parent: true
info:
mode: 0644
# container-management additional files
- src: ./build-tmp/container-management/NOTICE.md
dst: container-management
strip_parent: true
info:
mode: 0644
# file-upload additional files
- src: ./build-tmp/file-upload/NOTICE.md
dst: file-upload
strip_parent: true
info:
mode: 0644
# software-update additional files
- src: ./build-tmp/software-update/NOTICE.md
dst: software-update
strip_parent: true
info:
mode: 0644
nfpms:
- builds:
- build-suite-connector-deb
- build-container-management-deb
- build-container-management-cli-deb
- build-file-upload-deb
- build-software-update-deb
bindir: /usr/local/bin
replacements:
amd64: x86_64
maintainer: Contributors to the Eclipse Foundation, Kanto Project <[email protected]>
description: |-
Eclipse Kanto™ is a modular IoT edge software that enables devices for IoT with all essentials
like cloud connectivity, digital twins, local communication, container management,
and software updates - all configurable and remotely manageable by an IoT cloud ecosystem of choice.
homepage: https://eclipse.org/kanto
license: EPL-2.0
formats:
- deb
dependencies:
- containerd.io | containerd
- mosquitto
- iptables
scripts:
postinstall: "build/postinst"
preremove: "build/prerm"
postremove: "build/postrm"
contents:
# suite-connector additional resources
- src: ./build-tmp/suite-connector/resources/suite-connector.service
dst: /etc/systemd/system/suite-connector.service
file_info:
mode: 0644
- src: ./build-tmp/suite-connector/resources/config.json
dst: /etc/suite-connector/config.json
type: config
file_info:
mode: 0644
- src: ./build-tmp/suite-connector/cmd/connector/iothub.crt
dst: /etc/suite-connector/iothub.crt
type: config
file_info:
mode: 0644
- src: ./build-tmp/suite-connector/NOTICE.md
dst: /usr/share/doc/suite-connector/NOTICE.md
file_info:
mode: 0644
- src: ./build-tmp/suite-connector/README.md
dst: /usr/share/doc/suite-connector/README.md
file_info:
mode: 0644
- src: ./build-tmp/suite-connector/LICENSE
dst: /usr/share/doc/suite-connector/LICENSE
file_info:
mode: 0644
- src: ./build/suite-connector.conf
dst: /etc/mosquitto/conf.d/suite-connector.conf
type: config
file_info:
mode: 0644
# container-management additional resources
- src: ./build-tmp/container-management/containerm/resources/container-management.service
dst: /etc/systemd/system/container-management.service
file_info:
mode: 0644
- src: ./build-tmp/container-management/containerm/resources/config.json
dst: /etc/container-management/config.json
type: config
file_info:
mode: 0644
- src: ./build-tmp/container-management/NOTICE.md
dst: /usr/share/doc/container-management/NOTICE.md
file_info:
mode: 0644
- src: ./build-tmp/container-management/README.md
dst: /usr/share/doc/container-management/README.md
file_info:
mode: 0644
- src: ./build-tmp/container-management/LICENSE
dst: /usr/share/doc/container-management/LICENSE
file_info:
mode: 0644
# file-upload additional resources
- src: ./build-tmp/file-upload/resources/file-upload.service
dst: /etc/systemd/system/file-upload.service
file_info:
mode: 0644
- src: ./build-tmp/file-upload/resources/config.json
dst: /etc/file-upload/config.json
type: config
file_info:
mode: 0644
- src: ./build-tmp/file-upload/NOTICE.md
dst: /usr/share/doc/file-upload/NOTICE.md
file_info:
mode: 0644
- src: ./build-tmp/file-upload/README.md
dst: /usr/share/doc/file-upload/README.md
file_info:
mode: 0644
- src: ./build-tmp/file-upload/LICENSE
dst: /usr/share/doc/file-upload/LICENSE
file_info:
mode: 0644
# software-update additional resources
- src: ./build-tmp/software-update/resources/software-update.service
dst: /etc/systemd/system/software-update.service
file_info:
mode: 0644
- src: ./build-tmp/software-update/resources/config.json
dst: /etc/software-update/config.json
type: config
file_info:
mode: 0644
- src: ./build-tmp/software-update/NOTICE.md
dst: /usr/share/doc/software-update/NOTICE.md
file_info:
mode: 0644
- src: ./build-tmp/software-update/README.md
dst: /usr/share/doc/software-update/README.md
file_info:
mode: 0644
- src: ./build-tmp/software-update/LICENSE
dst: /usr/share/doc/software-update/LICENSE
file_info:
mode: 0644
checksum:
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
#discussion_category_name: Announcement
prerelease: auto
mode: prepend
header: |
## Eclipse Kanto {{ .Tag }} now available!
### {{ .Date }}
Check out what's new in Eclipse Kanto {{ .Tag }}!
footer: |
## Sincere thanks to all contributors for making this release possible!