switch to CGO-free builds

This commit is contained in:
Aine
2024-04-30 09:26:16 +03:00
parent 0e3655195a
commit 6a63e44bfc
1412 changed files with 5066605 additions and 277003 deletions

View File

@@ -11,8 +11,7 @@ default:
# update go deps
update *flags:
go get {{flags}} ./cmd
go get gitlab.com/etke.cc/linkpearl@latest
go get {{ flags }} ./cmd
go mod tidy
go mod vendor
@@ -33,8 +32,8 @@ profile type:
go tool pprof -http 127.0.0.1:8000 .pprof/{{ type }}.prof
# run unit tests
test:
@go test -cover -coverprofile=cover.out -coverpkg=./... -covermode=set ./...
test packages="./...":
@go test -cover -coverprofile=cover.out -coverpkg={{ packages }} -covermode=set {{ packages }}
@go tool cover -func=cover.out
-@rm -f cover.out
@@ -44,7 +43,7 @@ run:
# build app
build:
go build -v -o {{ project }} ./cmd
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -tags timetzdata,goolm -v -o {{ project }} ./cmd
# docker login
login: