-
Notifications
You must be signed in to change notification settings - Fork 44
/
.goreleaser.yml
111 lines (110 loc) · 3.03 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
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# you may remove this if you don't use vgo
# - go mod tidy
# - go mod vendor
builds:
- env:
- CGO_ENABLED=0
- GO111MODULE=on
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }} -X main.builtBy=goreleaser
goos:
- linux
- darwin
- windows
goarch:
- 386
- amd64
- arm
- arm64
- mips64
- mips64le
- mips
- mipsle
gomips:
- hardfloat
- softfloat
ignore:
- goos: darwin
goarch: 386
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
brews:
- tap:
owner: OpenIoTHub
name: homebrew-tap
folder: Formula
homepage: http://github.com/OpenIoTHub
description: OpenIoTHub GateWay
test: |
system "#{bin}/gateway-go -v"
scoop:
bucket:
owner: OpenIoTHub
name: scoop-bucket
homepage: http://github.com/OpenIoTHub
description: OpenIoTHub GateWay
license: MIT
nfpms:
- file_name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
homepage: http://github.com/OpenIoTHub
description: OpenIoTHub GateWay
maintainer: OpenIoTHub <[email protected]>
license: MIT
vendor: gateway-go
formats:
- deb
- rpm
scripts:
preinstall: "scripts/install_remove/preinstall.sh"
postinstall: "scripts/install_remove/postinstall.sh"
preremove: "scripts/install_remove/preremove.sh"
postremove: "scripts/install_remove/postremove.sh"
contents:
- src: systemd/**
dst: /etc/systemd/system
- src: gateway-go.yaml
dst: /etc/gateway-go/gateway-go.yaml
type: config
snapcrafts:
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
summary: OpenIoTHub GateWay.
description: |
OpenIoTHub GateWay
grade: stable
confinement: strict
# confinement: classic
publish: true
apps:
gateway-go:
plugs: ["network", "network-bind"]
daemon: simple
command: gateway-go
dockers:
- image_templates:
- 'openiothub/gateway-go:{{ .Tag }}'
- 'openiothub/gateway-go:v{{ .Major }}.{{ .Minor }}'
- 'openiothub/gateway-go:latest'
dockerfile: Dockerfile
ids: ['gateway-go']
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.source={{.GitURL}}"
- "--label=com.github.actions.name={{.ProjectName}}"
extra_files:
- scripts/entrypoint.sh