mirror of https://gitlab.com/etke.cc/emm.git
32 lines
648 B
Makefile
32 lines
648 B
Makefile
# show help by default
|
|
default:
|
|
@just --list --justfile {{ justfile() }}
|
|
|
|
# update go deps
|
|
update *flags:
|
|
go get {{ flags }} ./cmd
|
|
go mod tidy
|
|
go mod vendor
|
|
|
|
# run linter
|
|
lint:
|
|
golangci-lint run ./...
|
|
|
|
# automatically fix liter issues
|
|
lintfix:
|
|
golangci-lint run --fix ./...
|
|
|
|
# run unit tests
|
|
test packages="./...":
|
|
@go test -cover -coverprofile=cover.out -coverpkg={{ packages }} -covermode=set {{ packages }}
|
|
@go tool cover -func=cover.out
|
|
-@rm -f cover.out
|
|
|
|
# run app
|
|
run:
|
|
@go run ./cmd
|
|
|
|
# build app
|
|
build:
|
|
CGO_ENABLED=0 go build -ldflags '-extldflags "-static"' -tags timetzdata,goolm -v -o emm ./cmd
|