Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCameron Moore <moorereason@gmail.com>2016-09-19 01:10:10 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-09-19 01:10:10 +0300
commit6e692f2d119a265d88025b64615b74b5f4856e4d (patch)
tree090a0b7027711c6b181910e5afc9a85fce8a8d81 /Makefile
parentb3a721559aee067566605a082a5685e813d5afac (diff)
Add vendoring with govendor
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 15 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 222dbcc07..ba9a28621 100644
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,6 @@ 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}"
-DIRS=$(shell go list -f {{.Dir}} ./...)
-
all: gitinfo
install: install-gitinfo
@@ -34,39 +32,45 @@ docker:
docker cp hugo-build:/go/bin/hugo .
docker rm hugo-build
+govendor:
+ go get -u github.com/kardianos/govendor
+ go install github.com/kardianos/govendor
+ govendor get github.com/spf13/hugo
-check: get fmt vet test test-race
+check: fmt vet test test-race
cyclo:
- @for d in $(DIRS) ; do \
+ @for d in `govendor list -no-status +local | sed 's/github.com.spf13.hugo/./'` ; do \
if [ "`gocyclo -over 20 $$d | tee /dev/stderr`" ]; then \
echo "^ cyclomatic complexity exceeds 20, refactor the code!" && echo && exit 1; \
fi \
done
fmt:
- @for d in $(DIRS) ; do \
+ @for d in `govendor list -no-status +local | sed 's/github.com.spf13.hugo/./'` ; do \
if [ "`gofmt -l $$d/*.go | tee /dev/stderr`" ]; then \
echo "^ improperly formatted go files" && echo && exit 1; \
fi \
done
lint:
- @if [ "`golint ./... | tee /dev/stderr`" ]; then \
- echo "^ golint errors!" && echo && exit 1; \
- fi
+ @for d in `govendor list -no-status +local | sed 's/github.com.spf13.hugo/./'` ; do \
+ if [ "`golint $$d | tee /dev/stderr`" ]; then \
+ echo "^ golint errors!" && echo && exit 1; \
+ fi \
+ done
get:
go get -v -t ./...
test:
- go test ./...
+ govendor test +local
test-race:
- go test -race ./...
+ govendor test -race +local
vet:
- @if [ "`go vet ./... | tee /dev/stderr`" ]; then \
+ @if [ "`govendor vet +local | tee /dev/stderr`" ]; then \
echo "^ go vet errors!" && echo && exit 1; \
fi