Skip to content

Commit

Permalink
Put CGO_ENABLED=0 for each build (#583)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Poignant <[email protected]>
  • Loading branch information
thomaspoignant authored Mar 21, 2023
1 parent 8440918 commit b4120c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ builds:
- id: go-feature-flag-migration-cli
main: ./cmd/migrationcli
binary: go-feature-flag-migration-cli
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
Expand All @@ -31,6 +33,8 @@ builds:
- id: go-feature-flag-relay-proxy
main: ./cmd/relayproxy
binary: go-feature-flag-relay-proxy
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
Expand All @@ -53,6 +57,8 @@ builds:
- id: go-feature-flag-lint
main: ./cmd/lint
binary: go-feature-flag-lint
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ build: build-migrationcli build-relayproxy build-lint ## Build all the binaries

build-migrationcli: ## Build the migration cli in out/bin/
mkdir -p out/bin
GO111MODULE=on $(GOCMD) build -mod vendor -o out/bin/migrationcli ./cmd/migrationcli/
CGO_ENABLED=0 GO111MODULE=on $(GOCMD) build -mod vendor -o out/bin/migrationcli ./cmd/migrationcli/

build-relayproxy: ## Build the relay proxy in out/bin/
mkdir -p out/bin
GO111MODULE=on $(GOCMD) build -mod vendor -o out/bin/relayproxy ./cmd/relayproxy/
CGO_ENABLED=0 GO111MODULE=on $(GOCMD) build -mod vendor -o out/bin/relayproxy ./cmd/relayproxy/

build-lint: ## Build the linter in out/bin/
mkdir -p out/bin
GO111MODULE=on $(GOCMD) build -mod vendor -o out/bin/lint ./cmd/lint/
CGO_ENABLED=0 GO111MODULE=on $(GOCMD) build -mod vendor -o out/bin/lint ./cmd/lint/

build-doc: ## Build the documentation
cd website; \
Expand Down

0 comments on commit b4120c7

Please sign in to comment.