From 2073871fa1e0c51f455ca9804ec02efb28378450 Mon Sep 17 00:00:00 2001 From: Deluan Date: Wed, 23 Dec 2020 13:20:41 -0500 Subject: [PATCH] Use netgo (instead of C bindings). Fix #700 --- .goreleaser.yml | 14 +++++++------- Makefile | 2 +- reflex.conf | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 4f6ff3204..e1ae133ea 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -15,7 +15,7 @@ builds: goarch: - amd64 flags: - - -tags=embed + - -tags=embed,netgo ldflags: - "-extldflags '-static -lz'" - -s -w -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}} @@ -28,7 +28,7 @@ builds: goarch: - 386 flags: - - -tags=embed + - -tags=embed,netgo ldflags: - "-extldflags '-static'" - -s -w -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}} @@ -47,7 +47,7 @@ builds: - 6 - 7 flags: - - -tags=embed + - -tags=embed,netgo ldflags: - "-extldflags '-static'" - -s -w -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}} @@ -62,7 +62,7 @@ builds: goarch: - arm64 flags: - - -tags=embed + - -tags=embed,netgo ldflags: - "-extldflags '-static'" - -s -w -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}} @@ -78,7 +78,7 @@ builds: goarch: - 386 flags: - - -tags=embed + - -tags=embed,netgo ldflags: - "-extldflags '-static'" - -s -w -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}} @@ -94,7 +94,7 @@ builds: goarch: - amd64 flags: - - -tags=embed + - -tags=embed,netgo ldflags: - "-extldflags '-static'" - -s -w -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}} @@ -110,7 +110,7 @@ builds: goarch: - amd64 flags: - - -tags=embed + - -tags=embed,netgo ldflags: - -s -w -X github.com/deluan/navidrome/consts.gitSha={{.ShortCommit}} -X github.com/deluan/navidrome/consts.gitTag={{.Version}} diff --git a/Makefile b/Makefile index fde40490d..3f6361379 100644 --- a/Makefile +++ b/Makefile @@ -88,7 +88,7 @@ buildall: check_env @(cd ./ui && npm run build) go-bindata -fs -prefix "resources" -tags embed -ignore="\\\*.go" -pkg resources -o resources/embedded_gen.go resources/... go-bindata -fs -prefix "ui/build" -tags embed -nocompress -pkg assets -o assets/embedded_gen.go ui/build/... - go build -ldflags="-X github.com/deluan/navidrome/consts.gitSha=$(GIT_SHA) -X github.com/deluan/navidrome/consts.gitTag=$(GIT_TAG)-SNAPSHOT" -tags=embed + go build -ldflags="-X github.com/deluan/navidrome/consts.gitSha=$(GIT_SHA) -X github.com/deluan/navidrome/consts.gitTag=$(GIT_TAG)-SNAPSHOT" -tags=embed,netgo .PHONY: buildall pre-push: lint test diff --git a/reflex.conf b/reflex.conf index 6d1b3b190..dd6d36159 100644 --- a/reflex.conf +++ b/reflex.conf @@ -1 +1 @@ --s -r "(\.go$$|\.cpp$$|\.h$$|navidrome.toml|resources)" -R "(^ui|^data|^db/migration)" -- go run . +-s -r "(\.go$$|\.cpp$$|\.h$$|navidrome.toml|resources)" -R "(^ui|^data|^db/migration)" -- go run -tags netgo .