Fix build

This commit is contained in:
binwiederhier 2025-07-10 21:06:39 +02:00
parent 3c8ac4a1e1
commit 8d6f1eecdf
2 changed files with 38 additions and 48 deletions

View file

@ -1,10 +1,10 @@
version: 2
before:
hooks:
- go mod download
- go mod tidy
builds:
-
id: ntfy_linux_amd64
- id: ntfy_linux_amd64
binary: ntfy
env:
- CGO_ENABLED=1 # required for go-sqlite3
@ -13,8 +13,7 @@ builds:
- "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
goos: [ linux ]
goarch: [ amd64 ]
-
id: ntfy_linux_armv6
- id: ntfy_linux_armv6
binary: ntfy
env:
- CGO_ENABLED=1 # required for go-sqlite3
@ -25,8 +24,7 @@ builds:
goos: [ linux ]
goarch: [ arm ]
goarm: [ 6 ]
-
id: ntfy_linux_armv7
- id: ntfy_linux_armv7
binary: ntfy
env:
- CGO_ENABLED=1 # required for go-sqlite3
@ -37,8 +35,7 @@ builds:
goos: [ linux ]
goarch: [ arm ]
goarm: [ 7 ]
-
id: ntfy_linux_arm64
- id: ntfy_linux_arm64
binary: ntfy
env:
- CGO_ENABLED=1 # required for go-sqlite3
@ -48,8 +45,7 @@ builds:
- "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
goos: [ linux ]
goarch: [ arm64 ]
-
id: ntfy_windows_amd64
- id: ntfy_windows_amd64
binary: ntfy
env:
- CGO_ENABLED=0 # explicitly disable, since we don't need go-sqlite3
@ -58,8 +54,7 @@ builds:
- "-X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
goos: [ windows ]
goarch: [ amd64 ]
-
id: ntfy_darwin_all
- id: ntfy_darwin_all
binary: ntfy
env:
- CGO_ENABLED=0 # explicitly disable, since we don't need go-sqlite3
@ -69,8 +64,7 @@ builds:
goos: [ darwin ]
goarch: [ amd64, arm64 ] # will be combined to "universal binary" (see below)
nfpms:
-
package_name: ntfy
- package_name: ntfy
homepage: https://heckel.io/ntfy
maintainer: Philipp C. Heckel <philipp.heckel@gmail.com>
description: Simple pub-sub notification service
@ -106,9 +100,8 @@ nfpms:
preremove: "scripts/prerm.sh"
postremove: "scripts/postrm.sh"
archives:
-
id: ntfy_linux
builds:
- id: ntfy_linux
ids:
- ntfy_linux_amd64
- ntfy_linux_armv6
- ntfy_linux_armv7
@ -122,19 +115,17 @@ archives:
- client/client.yml
- client/ntfy-client.service
- client/user/ntfy-client.service
-
id: ntfy_windows
builds:
- id: ntfy_windows
ids:
- ntfy_windows_amd64
format: zip
formats: [ zip ]
wrap_in_directory: true
files:
- LICENSE
- README.md
- client/client.yml
-
id: ntfy_darwin
builds:
- id: ntfy_darwin
ids:
- ntfy_darwin_all
wrap_in_directory: true
files:
@ -142,14 +133,13 @@ archives:
- README.md
- client/client.yml
universal_binaries:
-
id: ntfy_darwin_all
- id: ntfy_darwin_all
replace: true
name_template: ntfy
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
version_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:

View file

@ -220,7 +220,7 @@ cli-deps-static-sites:
touch server/docs/index.html server/site/app.html
cli-deps-all:
go install github.com/goreleaser/goreleaser@latest
go install github.com/goreleaser/goreleaser/v2@latest
cli-deps-gcc-armv6-armv7:
which arm-linux-gnueabi-gcc || { echo "ERROR: ARMv6/ARMv7 cross compiler not installed. On Ubuntu, run: apt install gcc-arm-linux-gnueabi"; exit 1; }