mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-23 15:03:05 +00:00
makefile: Add test-cover-html
This commit is contained in:
parent
20d82a7a1b
commit
b7e800454f
2 changed files with 9 additions and 1 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -11,4 +11,5 @@ cover.out
|
|||
.DS_Store
|
||||
*~
|
||||
vendor/*/
|
||||
*.bench
|
||||
*.bench
|
||||
coverage*.out
|
7
Makefile
7
Makefile
|
@ -7,6 +7,7 @@
|
|||
COMMIT_HASH=`git rev-parse --short HEAD 2>/dev/null`
|
||||
BUILD_DATE=`date +%FT%T%z`
|
||||
LDFLAGS=-ldflags "-X github.com/spf13/hugo/hugolib.CommitHash=${COMMIT_HASH} -X github.com/spf13/hugo/hugolib.BuildDate=${BUILD_DATE}"
|
||||
PACKAGES = $(shell govendor list -no-status +local | sed 's/github.com.spf13.hugo/./')
|
||||
|
||||
all: gitinfo
|
||||
|
||||
|
@ -74,3 +75,9 @@ vet:
|
|||
echo "^ go vet errors!" && echo && exit 1; \
|
||||
fi
|
||||
|
||||
test-cover-html:
|
||||
echo "mode: count" > coverage-all.out
|
||||
$(foreach pkg,$(PACKAGES),\
|
||||
govendor test -coverprofile=coverage.out -covermode=count $(pkg);\
|
||||
tail -n +2 coverage.out >> coverage-all.out;)
|
||||
go tool cover -html=coverage-all.out
|
Loading…
Reference in a new issue