# turbo-core is a library: there is nothing to build into a binary here, so the # targets are the ones that check it. # The version this checkout would publish, for the release script and for # anybody wondering what is on HEAD. A library has no binary to stamp, so this # is reported rather than compiled in. VERSION := $(shell git describe --tags --dirty 2>/dev/null || echo untagged) COMMIT := $(shell git rev-parse --short HEAD 2>/dev/null) .DEFAULT_GOAL := help ## help: list the available targets help: @grep -E '^## ' $(MAKEFILE_LIST) | sed 's/## //' ## test: run the whole test suite — the single documented command test: go test ./... ## test-verbose: run the whole test suite, naming every test test-verbose: go test -v ./... ## race: run the whole suite with the race detector race: go test -race ./... ## cover: run the tests and report statement coverage per package cover: go test -cover ./... ## version: print the version this checkout would publish version: @echo "$(VERSION) ($(COMMIT))" ## fmt: format every Go file in place fmt: go fmt ./... ## vet: run the standard Go static checks vet: go vet ./... ## check: format, vet and test — what to run before committing check: fmt vet test .PHONY: help test test-verbose race cover version fmt vet check