Skip to content

Commit d639fbd

Browse files
authored
fix(build): disable dynamic linking by setting CGO_ENABLED=0 (#267)
Disables dynamic linking (CGO_ENABLED=0) when building vervet binaries in CI to remove linking issues in the OS the binaries are executed.
1 parent 2af193b commit d639fbd

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

scripts/dist.bash

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ mkdir -p ./dist/bin
2020
go generate ./internal/cmd/...
2121

2222
for GOOS in linux darwin; do
23-
GOOS=$GOOS GOARCH=amd64 go build -a -o ./dist/bin/vervet-$GOOS-x64 ./cmd/vervet
24-
GOOS=$GOOS GOARCH=arm64 go build -a -o ./dist/bin/vervet-$GOOS-arm64 ./cmd/vervet
23+
CGO_ENABLED=0 GOOS=$GOOS GOARCH=amd64 go build -a -o ./dist/bin/vervet-$GOOS-x64 ./cmd/vervet
24+
CGO_ENABLED=0 GOOS=$GOOS GOARCH=arm64 go build -a -o ./dist/bin/vervet-$GOOS-arm64 ./cmd/vervet
2525
done
26-
GOOS=windows GOARCH=amd64 go build -a -o ./dist/bin/vervet.exe ./cmd/vervet
26+
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -a -o ./dist/bin/vervet.exe ./cmd/vervet
2727

2828
cp packaging/npm/passthrough.js dist/bin/vervet
2929
cp README.md LICENSE ATTRIBUTIONS dist/

vervet-underground/Makefile

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
GOMOD=go mod
2-
GOBUILD=go build
3-
GOTEST=go test
4-
51
.PHONY: fmt
62
fmt:
73
go fmt ./...
@@ -20,7 +16,7 @@ lint-docker:
2016

2117
.PHONY: tidy
2218
tidy:
23-
$(GOMOD) tidy -v
19+
go build tidy -v
2420

2521
.PHONY: test
2622
test:

0 commit comments

Comments
 (0)