forked from cybertec-postgresql/pgwatch2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser.yml
137 lines (119 loc) · 4.44 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
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# weirdly goreleaser doesn't all to include outside of the Go build "root" so need to copy
- cp -r grafana_dashboards ./pgwatch2/
- cp -r webpy ./pgwatch2/
builds:
- dir: pgwatch2
binary: pgwatch2-daemon
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
archives:
-
# Archive name template.
# Defaults:
# - if format is `tar.gz`, `gz` or `zip`:
# - `{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
# - if format is `binary`:
# - `{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}`
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
# Replacements for GOOS and GOARCH in the archive name.
# Keys should be valid GOOSs or GOARCHs.
# Values are the respective replacements.
# Default is empty.
replacements:
amd64: 64-bit
# Set to true, if you want all files in the archive to be in a single directory.
# If set to true and you extract the archive 'goreleaser_Linux_arm64.tar.gz',
# you get a folder 'goreleaser_Linux_arm64'.
# If set to false, all files are extracted separately.
# You can also set it to a custom folder name (templating is supported).
# Default is false.
wrap_in_directory: true
# Archive format. Valid options are `tar.gz`, `gz`, `zip` and `binary`.
# If format is `binary`, no archives are created and the binaries are instead
# uploaded directly.
# Default is `tar.gz`.
format: tar.gz
# Additional files/globs you want to add to the archive.
# Defaults are any files matching `LICENCE*`, `LICENSE*`,
# `README*` and `CHANGELOG*` (case-insensitive).
files:
- ./grafana_dashboards/**/*
- ./webpy/**/*
- ./pgwatch2/metrics/**/*
- ./pgwatch2/config/**/*
- ./pgwatch2/sql/**/*
- ./pgwatch2/startup-scripts/**/*
- ./pgwatch2/bootstrap/**/*
- ./README.md
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 }}"
# Replacements for GOOS and GOARCH in the package name.
# Keys should be valid GOOSs or GOARCHs.
# Values are the respective replacements.
# Default is empty.
replacements:
amd64: 64-bit
# Your app's vendor.
# Default is empty.
vendor: CYBERTEC PostgreSQL International GmbH
# Your app's homepage.
# Default is empty.
homepage: https://github.com/cybertec-postgresql/pgwatch2
maintainer: Pavlo Golub <[email protected]>
# Your app's description.
# Default is empty.
description: pgwatch2 metrics collector with metric definitions and sample YAML config
# Your app's license.
# Default is empty.
license: BSD 3-Clause License
# Formats to be generated.
formats:
- deb
- rpm
# Packages your package depends on.
dependencies:
# Packages your package recommends installing.
# For RPM packages rpmbuild >= 4.13 is required
recommends:
# Packages your package suggests installing.
# For RPM packages rpmbuild >= 4.13 is required
suggests:
# Packages that conflict with your package.
conflicts:
# Override default /usr/local/bin destination for binaries
bindir: /usr/bin
# Files or directories to add to your package (beyond the binary).
# Keys are source paths/globs to get the files from.
# Values are the destination locations of the files in the package.
contents:
- dst: "/etc/pgwatch2"
type: dir
- src: "./pgwatch2/metrics/*"
dst: "/etc/pgwatch2/metrics"
type: config
- src: "./pgwatch2/config/*"
dst: "/etc/pgwatch2/config"
type: config
- src: "./pgwatch2/sql/*"
dst: "/etc/pgwatch2/sql"
- src: "./pgwatch2/bootstrap/*"
dst: "/etc/pgwatch2/bootstrap"
- src: "./pgwatch2/startup-scripts/pgwatch2.service"
dst: "/etc/pgwatch2/startup-scripts/pgwatch2.service"
- src: "./grafana_dashboards/*"
dst: "/etc/pgwatch2/grafana-dashboards"
- src: "./pgwatch2/webpy/*"
dst: "/etc/pgwatch2/webpy"
- src: "./README.md"
dst: "/etc/pgwatch2/README.md"