switch to CGO-free builds
This commit is contained in:
9
justfile
9
justfile
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user