mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	makefile: Add test-cover-html
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -12,3 +12,4 @@ cover.out
 | 
			
		||||
*~
 | 
			
		||||
vendor/*/
 | 
			
		||||
*.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
 | 
			
		||||
		Reference in New Issue
	
	Block a user