You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
423 B
Makefile

5 years ago
build: clean coverage
if [ ! -d build ]; then mkdir build; fi
find ./cmd/ -mindepth 1 -maxdepth 1 -type d -exec go build -o ./build/ {} \;
test:
if [ ! -d coverage ]; then mkdir coverage; fi
go test -race -coverprofile coverage/coverage.out ./...
clean:
rm -rf coverage/*
rm -rf build/*
coverage: coverage/index.html
coverage/index.html: test
go tool cover -html="coverage/coverage.out" -o "coverage/index.html"