Skip to content

Commit

Permalink
goreleaser: improve portability
Browse files Browse the repository at this point in the history
- Use tags=netgo to ensure net package won't use cgo
- Rebuild stdlib (go build -a) to really disable cgo as it was
  tried in #2300
- Remove static ldflags as it would statically compile cgo
  • Loading branch information
dclaisse committed Feb 25, 2021
1 parent 3c6f5da commit 69fd662
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ builds:
- id: gobgp
main: ./cmd/gobgp/
binary: gobgp
ldflags: -s -extldflags "-static"
flags:
- -a
- -tags=netgo
ldflags: -s
goos:
- linux
goarch:
Expand All @@ -21,7 +24,10 @@ builds:
- id: gobgpd
main: ./cmd/gobgpd/
binary: gobgpd
ldflags: -s -extldflags "-static"
flags:
- -a
- -tags=netgo
ldflags: -s
goos:
- linux
goarch:
Expand Down

0 comments on commit 69fd662

Please sign in to comment.