33 lines
556 B
Makefile
33 lines
556 B
Makefile
|
define HELP_TEXT
|
||
|
Welcome!
|
||
|
|
||
|
Targets:
|
||
|
help provides help text
|
||
|
deps download dependencies
|
||
|
deps/upgrade upgrade dependencies
|
||
|
deps/tidy tidy dependencies
|
||
|
test run tests
|
||
|
legal prepends legal header to source code
|
||
|
|
||
|
endef
|
||
|
export HELP_TEXT
|
||
|
|
||
|
help:
|
||
|
@echo "$$HELP_TEXT"
|
||
|
|
||
|
deps:
|
||
|
go mod download
|
||
|
|
||
|
deps/upgrade:
|
||
|
go get -u ./...
|
||
|
|
||
|
deps/tidy:
|
||
|
go mod tidy
|
||
|
|
||
|
test:
|
||
|
@go test -v -race -covermode=atomic -coverprofile=coverage.txt -coverpkg=./... ./...
|
||
|
|
||
|
legal: .legal
|
||
|
.legal:
|
||
|
@git ls-files | xargs -I{} addlicense -f ./legal/header.txt -skip yaml -skip yml {}
|