mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-12-14 11:47:33 +00:00
139 lines
3.7 KiB
YAML
139 lines
3.7 KiB
YAML
before:
|
|
hooks:
|
|
- go mod download
|
|
- go mod tidy
|
|
builds:
|
|
-
|
|
id: ntfy
|
|
binary: ntfy
|
|
env:
|
|
- CGO_ENABLED=1 # required for go-sqlite3
|
|
tags: [sqlite_omit_load_extension,osusergo,netgo]
|
|
ldflags:
|
|
- "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
|
|
goos: [linux]
|
|
goarch: [amd64]
|
|
hooks:
|
|
post:
|
|
- upx "{{ .Path }}" # apt install upx
|
|
-
|
|
id: ntfy_armv7
|
|
binary: ntfy
|
|
env:
|
|
- CGO_ENABLED=1 # required for go-sqlite3
|
|
- CC=arm-linux-gnueabi-gcc # apt install gcc-arm-linux-gnueabi
|
|
tags: [sqlite_omit_load_extension,osusergo,netgo]
|
|
ldflags:
|
|
- "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
|
|
goos: [linux]
|
|
goarch: [arm]
|
|
goarm: [7]
|
|
hooks:
|
|
post:
|
|
- upx "{{ .Path }}" # apt install upx
|
|
-
|
|
id: ntfy_arm64
|
|
binary: ntfy
|
|
env:
|
|
- CGO_ENABLED=1 # required for go-sqlite3
|
|
- CC=aarch64-linux-gnu-gcc # apt install gcc-aarch64-linux-gnu
|
|
tags: [sqlite_omit_load_extension,osusergo,netgo]
|
|
ldflags:
|
|
- "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
|
|
goos: [linux]
|
|
goarch: [arm64]
|
|
hooks:
|
|
post:
|
|
- upx "{{ .Path }}" # apt install upx
|
|
nfpms:
|
|
-
|
|
package_name: ntfy
|
|
homepage: https://heckel.io/ntfy
|
|
maintainer: Philipp C. Heckel <philipp.heckel@gmail.com>
|
|
description: Simple pub-sub notification service
|
|
license: Apache 2.0
|
|
formats:
|
|
- deb
|
|
- rpm
|
|
bindir: /usr/bin
|
|
contents:
|
|
- src: server/server.yml
|
|
dst: /etc/ntfy/server.yml
|
|
type: config
|
|
- src: server/ntfy.service
|
|
dst: /lib/systemd/system/ntfy.service
|
|
- src: client/client.yml
|
|
dst: /etc/ntfy/client.yml
|
|
type: config
|
|
- src: client/ntfy-client.service
|
|
dst: /lib/systemd/system/ntfy-client.service
|
|
- dst: /var/cache/ntfy
|
|
type: dir
|
|
- dst: /var/cache/ntfy/attachments
|
|
type: dir
|
|
- dst: /var/lib/ntfy
|
|
type: dir
|
|
- dst: /usr/share/ntfy/logo.png
|
|
src: server/static/img/ntfy.png
|
|
scripts:
|
|
preinstall: "scripts/preinst.sh"
|
|
postinstall: "scripts/postinst.sh"
|
|
preremove: "scripts/prerm.sh"
|
|
postremove: "scripts/postrm.sh"
|
|
archives:
|
|
-
|
|
wrap_in_directory: true
|
|
files:
|
|
- LICENSE
|
|
- README.md
|
|
- server/server.yml
|
|
- server/ntfy.service
|
|
- client/client.yml
|
|
- client/ntfy-client.service
|
|
replacements:
|
|
386: i386
|
|
amd64: x86_64
|
|
checksum:
|
|
name_template: 'checksums.txt'
|
|
snapshot:
|
|
name_template: "{{ .Tag }}-next"
|
|
changelog:
|
|
sort: asc
|
|
filters:
|
|
exclude:
|
|
- '^docs:'
|
|
- '^test:'
|
|
dockers:
|
|
- image_templates:
|
|
- &amd64_image "binwiederhier/ntfy:{{ .Tag }}-amd64"
|
|
use: buildx
|
|
dockerfile: Dockerfile
|
|
goarch: amd64
|
|
build_flag_templates:
|
|
- "--platform=linux/amd64"
|
|
- image_templates:
|
|
- &arm64v8_image "binwiederhier/ntfy:{{ .Tag }}-arm64v8"
|
|
use: buildx
|
|
dockerfile: Dockerfile
|
|
goarch: arm64
|
|
build_flag_templates:
|
|
- "--platform=linux/arm64/v8"
|
|
- image_templates:
|
|
- &armv7_image "binwiederhier/ntfy:{{ .Tag }}-armv7"
|
|
use: buildx
|
|
dockerfile: Dockerfile
|
|
goarch: arm
|
|
goarm: 7
|
|
build_flag_templates:
|
|
- "--platform=linux/arm/v7"
|
|
docker_manifests:
|
|
- name_template: "binwiederhier/ntfy:latest"
|
|
image_templates:
|
|
- *amd64_image
|
|
- *arm64v8_image
|
|
- *armv7_image
|
|
- name_template: "binwiederhier/ntfy:{{ .Tag }}"
|
|
image_templates:
|
|
- *amd64_image
|
|
- *arm64v8_image
|
|
- *armv7_image
|