mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-22 08:25:38 +00:00
Makefile: don't use glide for testable paths
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
9be05594fe
commit
656cd41822
1 changed files with 7 additions and 6 deletions
13
Makefile
13
Makefile
|
@ -19,12 +19,13 @@ validation.tags: .test.tags .vet.tags .cli.test
|
||||||
test: .test
|
test: .test
|
||||||
|
|
||||||
CLEAN_FILES += .test .test.tags
|
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)
|
.test: $(SOURCE_FILES)
|
||||||
go test -v $$(glide novendor) && touch $@
|
go test -v $(NO_VENDOR_DIR) && touch $@
|
||||||
|
|
||||||
.test.tags: $(SOURCE_FILES)
|
.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
|
.PHONY: lint
|
||||||
lint: .lint
|
lint: .lint
|
||||||
|
@ -33,7 +34,7 @@ CLEAN_FILES += .lint
|
||||||
|
|
||||||
.lint: $(SOURCE_FILES)
|
.lint: $(SOURCE_FILES)
|
||||||
if [[ "$(go version |awk '{ print $3 }')" =~ ^go1\.11\. ]] ; then \
|
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 \
|
else \
|
||||||
touch $@ ; \
|
touch $@ ; \
|
||||||
fi
|
fi
|
||||||
|
@ -44,10 +45,10 @@ vet: .vet .vet.tags
|
||||||
CLEAN_FILES += .vet .vet.tags
|
CLEAN_FILES += .vet .vet.tags
|
||||||
|
|
||||||
.vet: $(SOURCE_FILES)
|
.vet: $(SOURCE_FILES)
|
||||||
go vet $$(glide novendor) && touch $@
|
go vet $(NO_VENDOR_DIR) && touch $@
|
||||||
|
|
||||||
.vet.tags: $(SOURCE_FILES)
|
.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
|
.PHONY: cli.test
|
||||||
cli.test: .cli.test
|
cli.test: .cli.test
|
||||||
|
@ -67,7 +68,7 @@ $(BUILD): $(SOURCE_FILES)
|
||||||
go build -o $(BUILD) $(BUILDPATH)
|
go build -o $(BUILD) $(BUILDPATH)
|
||||||
|
|
||||||
install.tools:
|
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
|
if [[ "$(go version |awk '{ print $3 }')" =~ ^go1\.11\. ]] ; then go get -u golang.org/x/lint/golint ; fi
|
||||||
|
|
||||||
./bin:
|
./bin:
|
||||||
|
|
Loading…
Reference in a new issue