icinga2-matrix-notification/.goreleaser.yaml
Jan Dittberner 902d4cb310 Release 0.1.0
- add packaging via goreleaser
- finaliza changelog for 0.1.0
- add debian changelog and copyright
- add configuration for golangci-lint
2024-09-26 16:02:43 +02:00

128 lines
No EOL
3.5 KiB
YAML

# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
- sh -c "gzip --best -n -c debian/changelog > debian/changelog.Debian.gz"
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
id: matrix-host-notification
binary: matrix-host-notification
main: ./cmd/matrix-host-notification/main.go
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
id: matrix-service-notification
binary: matrix-service-notification
main: ./cmd/matrix-service-notification/main.go
archives:
- format: tar.gz
allow_different_binary_count: true
wrap_in_directory: true
# this name template makes the OS and Arch compatible with the results of `uname`.
builds:
- matrix-host-notification
- matrix-service-notification
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
files:
- cfg/*
- COPYING
- README.md
checksum:
name_template: "checksums.txt"
changelog:
sort: asc
snapshot:
version_template: "{{ incpatch .Version }}-next"
nfpms:
- package_name: icinga2-matrix-notification
builds:
- matrix-host-notification
- matrix-service-notification
file_name_template: "{{ .ProjectName }}_{{ .Version }}-1_{{ .Arch }}"
vendor: Jan Dittberner
maintainer: Jan Dittberner <jan@dittberner.info>
description: |-
Icinga2 notification commands to send notifications to Matrix chat rooms
The icinga2-matrix-notification package contains notification commands to send
Icinga2 host and service status notifications to Matrix chat rooms.
.
The package contains configuration examples that need to be copied and adapted
for your Icinga 2 installation.
formats:
- deb
bindir: /usr/lib/nagios/plugins
section: utils
release: "1"
priority: optional
deb:
lintian_overrides:
- statically-linked-binary
- initial-upload-closes-no-bugs
recommends:
- icinga2
contents:
- src: debian/changelog.Debian.gz
dst: /usr/share/doc/{{ .ProjectName }}/changelog.Debian.gz
file_info:
mode: 0644
- src: debian/copyright
dst: /usr/share/doc/{{ .ProjectName }}/copyright
file_info:
mode: 0644
- src: README.md
dst: /usr/share/doc/{{ .ProjectName }}/README.md
file_info:
mode: 0644
- src: cfg/command.cfg
dst: /usr/share/doc/{{ .ProjectName }}/examples/cfg/command.cfg
file_info:
mode: 0644
- src: cfg/services.cfg
dst: /usr/share/doc/{{ .ProjectName }}/examples/cfg/services.cfg
file_info:
mode: 0644
- src: cfg/templates.cfg
dst: /usr/share/doc/{{ .ProjectName }}/examples/cfg/templates.cfg
file_info:
mode: 0644
release:
gitea:
owner: jan
name: "icinga2-matrix-notification"
gitea_urls:
api: https://git.dittberner.info/api/v1
download: https://git.dittberner.info