Skip to content

Commit bbbab8d

Browse files
author
Philipp Heckel
committed
Properly statically compile, without warnings; netgo,osusergo
1 parent ad057c1 commit bbbab8d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.goreleaser.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ builds:
77
binary: ntfy
88
env:
99
- CGO_ENABLED=1 # required for go-sqlite3
10-
tags: [sqlite_omit_load_extension]
10+
tags: [sqlite_omit_load_extension,osusergo,netgo]
1111
ldflags:
1212
- "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
1313
goos: [linux]
@@ -18,7 +18,7 @@ builds:
1818
env:
1919
- CGO_ENABLED=1 # required for go-sqlite3
2020
- CC=arm-linux-gnueabi-gcc # apt install gcc-arm-linux-gnueabi
21-
tags: [sqlite_omit_load_extension]
21+
tags: [sqlite_omit_load_extension,osusergo,netgo]
2222
ldflags:
2323
- "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
2424
goos: [linux]
@@ -32,7 +32,7 @@ builds:
3232
env:
3333
- CGO_ENABLED=1 # required for go-sqlite3
3434
- CC=aarch64-linux-gnu-gcc # apt install gcc-aarch64-linux-gnu
35-
tags: [sqlite_omit_load_extension]
35+
tags: [sqlite_omit_load_extension,osusergo,netgo]
3636
ldflags:
3737
- "-linkmode=external -extldflags=-static -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
3838
goos: [linux]

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ build-simple: clean
103103
export CGO_ENABLED=1
104104
$(GO) build \
105105
-o dist/ntfy_linux_amd64/ntfy \
106-
-tags sqlite_omit_load_extension \
106+
-tags sqlite_omit_load_extension,osusergo,netgo \
107107
-ldflags \
108108
"-linkmode=external -extldflags=-static -s -w -X main.version=$(VERSION) -X main.commit=$(shell git rev-parse --short HEAD) -X main.date=$(shell date +%s)"
109109

0 commit comments

Comments
 (0)