From a2825880bc05c8e4391f21de348647647fcf5d11 Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Wed, 11 May 2022 13:47:41 -0400 Subject: [PATCH] macOS server support, this is just to support iOS development, not for prod --- .goreleaser.yml | 4 ++-- cmd/{serve_linux.go => serve.go} | 2 ++ cmd/{serve_linux_test.go => serve_test.go} | 0 3 files changed, 4 insertions(+), 2 deletions(-) rename cmd/{serve_linux.go => serve.go} (99%) rename cmd/{serve_linux_test.go => serve_test.go} (100%) diff --git a/.goreleaser.yml b/.goreleaser.yml index 8c7bd84..566571f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -70,9 +70,9 @@ builds: id: ntfy_darwin_all binary: ntfy env: - - CGO_ENABLED=0 # explicitly disable, since we don't need go-sqlite3 + - CGO_ENABLED=1 # explicitly disable, since we don't need go-sqlite3 ldflags: - - "-X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}" + - "-linkmode=external -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}" goos: [darwin] goarch: [amd64, arm64] # will be combined to "universal binary" (see below) nfpms: diff --git a/cmd/serve_linux.go b/cmd/serve.go similarity index 99% rename from cmd/serve_linux.go rename to cmd/serve.go index b56268b..38ea4b6 100644 --- a/cmd/serve_linux.go +++ b/cmd/serve.go @@ -1,3 +1,5 @@ +//go:build !windows + package cmd import ( diff --git a/cmd/serve_linux_test.go b/cmd/serve_test.go similarity index 100% rename from cmd/serve_linux_test.go rename to cmd/serve_test.go