forked from czerwonk/ping_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
96 lines (82 loc) · 2.19 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
dist: artifacts
before:
hooks:
- go mod download
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
- freebsd
goarch:
- arm
- arm64
- mips
- mipsle
- mips64
- mips64le
- amd64
gomips:
- hardfloat
- softfloat
goarm:
- "6"
- "7"
ignore:
# pretty sure all 64bit MIPS chips have a FPU
- { goarch: mips64, gomips: softfloat }
- { goarch: mips64le, gomips: softfloat }
flags:
- -trimpath
ldflags:
- -s -w -X main.version={{ .Version }}
binary: ping_exporter
archives:
- format: tar.gz
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if eq .Mips "softfloat" }}sf{{ end }}'
format_overrides:
- goos: windows
format: zip
snapshot:
name_template: SNAPSHOT-{{ .ShortCommit }}
nfpms:
- vendor: Daniel Czerwonk
homepage: "https://github.com/czerwonk/ping_exporter"
maintainer: Daniel Czerwonk
description: "Ping prometheus exporter"
license: MIT
section: net
priority: extra
file_name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if eq .Mips "softfloat" }}sf{{ end }}'
formats:
- rpm # TODO: create pre/post install/remove scripts
- deb
bindir: /usr/bin
contents:
# main systemd unit
- src: dist/ping_exporter.service
dst: /lib/systemd/system/ping_exporter.service
# sample configuration
- src: dist/ping_exporter.yaml
dst: /etc/ping_exporter/config.yml
type: config
# systemd drop-ins, will be managed in postinstall and preremove script
- src: dist/ping_exporter.d/systemd-*.conf
dst: /usr/local/share/ping_exporter/
- dst: /run/systemd/system/ping_exporter.service.d
type: dir
overrides:
deb:
scripts:
postinstall: dist/postinstall.sh
preremove: dist/preremove.sh
postremove: dist/postremove.sh
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'