From 7094f71f437e7c35d50c54ce4ba6791f68a148d0 Mon Sep 17 00:00:00 2001 From: Tyler Stiene Date: Mon, 1 Feb 2021 17:43:43 -0500 Subject: [PATCH] static build use netgo --- .goreleaser.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 8a1834f..8d2e246 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -7,8 +7,11 @@ before: # you may remove this if you don't need go generate # - go generate ./... builds: - - env: + - ldflags: '-s -w -linkmode external -extldflags "-static" -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser' + env: - CGO_ENABLED=1 + flags: + - -tags=netgo goos: - linux # - windows