-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.goreleaser.yaml
245 lines (241 loc) · 8.75 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
# Copyright © 2022-2024 Christian Fritz <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: 2
before:
hooks:
- make buildDeps
# You may remove this if you don't use go modules.
- go mod download
# you may remove this if you don't need go generate
- make generate completions
builds:
- id: knx-exporter
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm
- arm64
goarm:
- "7"
ldflags:
- -X 'github.com/chr-fritz/knx-exporter/version.Version={{.Version}}'
- -X 'github.com/chr-fritz/knx-exporter/version.Revision={{.ShortCommit}}'
- -X 'github.com/chr-fritz/knx-exporter/version.Branch={{.Branch}}'
- -X 'github.com/chr-fritz/knx-exporter/version.CommitDate={{.CommitTimestamp}}'
- -s -w -extldflags '-static'
ignore:
- goos: windows
goarch: arm
dockers:
- goos: linux
goarch: amd64
ids:
- knx-exporter
use: buildx
image_templates:
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-x64"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-x64"
skip_push: false
dockerfile: Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.CommitDate}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.url=https://github.com/chr-fritz/knx-exporter"
- "--label=org.opencontainers.image.licenses=Apache-2.0"
- "--platform=linux/amd64"
extra_files:
- pkg/.knx-exporter.yaml
- scripts/docker/etc_passwd
- goos: linux
goarch: arm64
ids:
- knx-exporter
use: buildx
image_templates:
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-arm64"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-arm64"
skip_push: false
dockerfile: Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.CommitDate}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.url=https://github.com/chr-fritz/knx-exporter"
- "--label=org.opencontainers.image.licenses=Apache-2.0"
- "--platform=linux/arm64/v8"
extra_files:
- pkg/.knx-exporter.yaml
- scripts/docker/etc_passwd
- goos: linux
goarch: arm
goarm: 7
ids:
- knx-exporter
use: buildx
image_templates:
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-arm7"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-arm7"
skip_push: false
dockerfile: Dockerfile
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.CommitDate}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.url=https://github.com/chr-fritz/knx-exporter"
- "--label=org.opencontainers.image.licenses=Apache-2.0"
- "--platform=linux/arm/v7"
extra_files:
- pkg/.knx-exporter.yaml
- scripts/docker/etc_passwd
docker_manifests:
- name_template: "quay.io/chrfritz/knx-exporter:latest"
skip_push: auto
image_templates:
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-x64"
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-arm64"
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-arm7"
- name_template: "quay.io/chrfritz/knx-exporter:{{ .Tag }}"
image_templates:
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-x64"
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-arm64"
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-arm7"
- name_template: "quay.io/chrfritz/knx-exporter:v{{ .Major }}.{{ .Minor }}"
skip_push: auto
image_templates:
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-x64"
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-arm64"
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-arm7"
- name_template: "quay.io/chrfritz/knx-exporter:v{{ .Major }}"
skip_push: auto
image_templates:
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-x64"
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-arm64"
- "quay.io/chrfritz/knx-exporter:{{ .Tag }}-arm7"
- name_template: "ghcr.io/chr-fritz/knx-exporter:latest"
skip_push: auto
image_templates:
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-x64"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-arm64"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-arm7"
- name_template: "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}"
image_templates:
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-x64"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-arm64"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-arm7"
- name_template: "ghcr.io/chr-fritz/knx-exporter:v{{ .Major }}.{{ .Minor }}"
skip_push: auto
image_templates:
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-x64"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-arm64"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-arm7"
- name_template: "ghcr.io/chr-fritz/knx-exporter:v{{ .Major }}"
skip_push: auto
image_templates:
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-x64"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-arm64"
- "ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}-arm7"
brews:
- repository:
owner: chr-fritz
name: homebrew-tap
commit_author:
name: goreleaserbot
email: [email protected]
directory: Formula
homepage: "https://github.com/chr-fritz/knx-exporter"
description: "The KNX Prometheus Exporter is a small bridge to export values measured by KNX sensors to Prometheus."
license: "Apache-2.0"
skip_upload: auto
test: |
system "#{bin}/knx-exporter --version"
install: |
bin.install "knx-exporter"
bash_completion.install "completions/knx-exporter.bash" => "knx-exporter"
zsh_completion.install "completions/knx-exporter.zsh" => "_knx-exporter"
fish_completion.install "completions/knx-exporter.fish"
nfpms:
- package_name: knx-exporter
file_name_template: "{{ .ConventionalFileName }}"
builds:
- knx-exporter
vendor: chr-fritz
homepage: https://github.com/chr-fritz/knx-exporter
maintainer: chr-fritz<[email protected]>
license: Apache 2.0
formats:
- deb
bindir: /usr/bin
contents:
# Config
- src: scripts/defaultGaConfig.yaml
dst: /etc/knx-exporter/ga-config.yaml
type: "config|noreplace"
# systemd
- src: scripts/systemd/knx-exporter.service
dst: /etc/systemd/system/knx-exporter.service
- src: scripts/systemd/knx-exporter.env
dst: /etc/default/knx-exporter
type: "config|noreplace"
# Completion
- src: completions/knx-exporter.bash
dst: /usr/share/bash-completion/completions/knx-exporter
- src: completions/knx-exporter.fish
dst: /usr/share/fish/vendor_completions.d/knx-exporter
- src: completions/knx-exporter.zsh
dst: /usr/share/zsh/vendor-completions/_knx-exporter
scripts:
postinstall: "scripts/postinstall.sh"
preremove: "scripts/preremove.sh"
archives:
- files:
- README.md
- LICENSE
- completions/*
- docs/**
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
prerelease: auto
footer: |
## Docker Images
[ghcr.io/chr-fritz/knx-exporter](https://ghcr.io/chr-fritz/knx-exporter)
* `ghcr.io/chr-fritz/knx-exporter:latest`
* `ghcr.io/chr-fritz/knx-exporter:{{ .Tag }}`
* `ghcr.io/chr-fritz/knx-exporter:v{{ .Major }}.{{ .Minor }}`
* `ghcr.io/chr-fritz/knx-exporter:v{{ .Major }}`
[quay.io/chrfritz/knx-exporter](https://quay.io/chrfritz/knx-exporter) (deprecated)
* `quay.io/chrfritz/knx-exporter:latest`
* `quay.io/chrfritz/knx-exporter:{{ .Tag }}`
* `quay.io/chrfritz/knx-exporter:v{{ .Major }}.{{ .Minor }}`
* `quay.io/chrfritz/knx-exporter:v{{ .Major }}`