1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-12-22 05:46:30 +00:00

Makefile: don't use glide for testable paths

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2019-01-21 12:06:24 -05:00
parent 9be05594fe
commit 656cd41822
Signed by: vbatts
GPG key ID: 10937E57733F1362

View file

@ -19,12 +19,13 @@ validation.tags: .test.tags .vet.tags .cli.test
test: .test
CLEAN_FILES += .test .test.tags
NO_VENDOR_DIR := $(shell find . -type f -name '*.go' ! -path './vendor*' ! -path './.git*' ! -path './.vscode*' -exec dirname "{}" \; | sort -u)
.test: $(SOURCE_FILES)
go test -v $$(glide novendor) && touch $@
go test -v $(NO_VENDOR_DIR) && touch $@
.test.tags: $(SOURCE_FILES)
set -e ; for tag in $(TAGS) ; do go test -tags $$tag -v $$(glide novendor) ; done && touch $@
set -e ; for tag in $(TAGS) ; do go test -tags $$tag -v $(NO_VENDOR_DIR) ; done && touch $@
.PHONY: lint
lint: .lint
@ -33,7 +34,7 @@ CLEAN_FILES += .lint
.lint: $(SOURCE_FILES)
if [[ "$(go version |awk '{ print $3 }')" =~ ^go1\.11\. ]] ; then \
set -e ; for dir in $$(glide novendor) ; do golint -set_exit_status $$dir ; done && touch $@ \
set -e ; for dir in $(NO_VENDOR_DIR) ; do golint -set_exit_status $$dir ; done && touch $@ \
else \
touch $@ ; \
fi
@ -44,10 +45,10 @@ vet: .vet .vet.tags
CLEAN_FILES += .vet .vet.tags
.vet: $(SOURCE_FILES)
go vet $$(glide novendor) && touch $@
go vet $(NO_VENDOR_DIR) && touch $@
.vet.tags: $(SOURCE_FILES)
set -e ; for tag in $(TAGS) ; do go vet -tags $$tag -v $$(glide novendor) ; done && touch $@
set -e ; for tag in $(TAGS) ; do go vet -tags $$tag -v $(NO_VENDOR_DIR) ; done && touch $@
.PHONY: cli.test
cli.test: .cli.test
@ -67,7 +68,7 @@ $(BUILD): $(SOURCE_FILES)
go build -o $(BUILD) $(BUILDPATH)
install.tools:
go get -u -v github.com/Masterminds/glide
go get -u -v github.com/golang/dep/cmd/dep
if [[ "$(go version |awk '{ print $3 }')" =~ ^go1\.11\. ]] ; then go get -u golang.org/x/lint/golint ; fi
./bin: