Skip to content

Commit c57324f

Browse files
committed
Add goreleaser configuration files
1 parent d6fd92e commit c57324f

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
bin/
22
go/
33
*.snap
4+
5+
dist/

.goreleaser.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
4+
# The lines below are called `modelines`. See `:help modeline`
5+
# Feel free to remove those if you don't want/need to use them.
6+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
7+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
8+
9+
version: 2
10+
11+
before:
12+
hooks:
13+
# You may remove this if you don't use go modules.
14+
- go mod tidy
15+
# you may remove this if you don't need go generate
16+
- go generate ./...
17+
18+
builds:
19+
- env:
20+
- CGO_ENABLED=0
21+
goos:
22+
- linux
23+
24+
archives:
25+
- format: tar.gz
26+
# this name template makes the OS and Arch compatible with the results of `uname`.
27+
name_template: >-
28+
{{ .ProjectName }}_
29+
{{- title .Os }}_
30+
{{- if eq .Arch "amd64" }}x86_64
31+
{{- else if eq .Arch "386" }}i386
32+
{{- else }}{{ .Arch }}{{ end }}
33+
{{- if .Arm }}v{{ .Arm }}{{ end }}
34+
35+
changelog:
36+
sort: asc
37+
filters:
38+
exclude:
39+
- "^docs:"
40+
- "^test:"
41+
42+
nfpms:
43+
- id: slurm_exporter
44+
package_name: slurm_exporter
45+
formats:
46+
- rpm

0 commit comments

Comments
 (0)