build: disable cgo for makefile build (!97)

* Disable `CGO` in the makefile build to avoid dependencies on external C libraries
* This also aligns with the build done for releases and docker images

https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/merge_requests/97
This commit is contained in:
Hector 2023-06-22 15:22:42 +00:00
parent 5f879e1921
commit b9ab77d62d

View File

@ -34,7 +34,7 @@ check/fmt: download
# Build project
.PHONY: build
build:
go build \
CGO_ENABLED=0 go build \
-ldflags "\
-X main.version=${shell git describe --tags} \
-X main.commit=${shell git rev-parse HEAD} \