test: only work with non-vendored source
by vendoring source, now './...' includes loads of vet/test/lint errors. Let's ignore those. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
c9762c4d0e
commit
1f53bd1b61
2 changed files with 9 additions and 8 deletions
|
@ -8,8 +8,8 @@ sudo: false
|
||||||
before_install:
|
before_install:
|
||||||
- git config --global url."https://".insteadOf git://
|
- git config --global url."https://".insteadOf git://
|
||||||
- go get -u github.com/golang/lint/golint
|
- go get -u github.com/golang/lint/golint
|
||||||
|
- go get -u github.com/Masterminds/glide
|
||||||
- mkdir -p $GOPATH/src/github.com/vbatts && ln -sf $(pwd) $GOPATH/src/github.com/vbatts/go-mtree
|
- mkdir -p $GOPATH/src/github.com/vbatts && ln -sf $(pwd) $GOPATH/src/github.com/vbatts/go-mtree
|
||||||
- go get ./...
|
|
||||||
|
|
||||||
install: true
|
install: true
|
||||||
|
|
||||||
|
|
15
Makefile
15
Makefile
|
@ -1,5 +1,6 @@
|
||||||
|
|
||||||
BUILD := gomtree
|
BUILD := gomtree
|
||||||
|
BUILDPATH := github.com/vbatts/go-mtree/cmd/gomtree
|
||||||
CWD := $(shell pwd)
|
CWD := $(shell pwd)
|
||||||
SOURCE_FILES := $(shell find . -type f -name "*.go")
|
SOURCE_FILES := $(shell find . -type f -name "*.go")
|
||||||
CLEAN_FILES := *~
|
CLEAN_FILES := *~
|
||||||
|
@ -20,10 +21,10 @@ test: .test
|
||||||
CLEAN_FILES += .test .test.tags
|
CLEAN_FILES += .test .test.tags
|
||||||
|
|
||||||
.test: $(SOURCE_FILES)
|
.test: $(SOURCE_FILES)
|
||||||
go test -v ./... && touch $@
|
go test -v $$(glide novendor) && touch $@
|
||||||
|
|
||||||
.test.tags: $(SOURCE_FILES)
|
.test.tags: $(SOURCE_FILES)
|
||||||
set -e ; for tag in $(TAGS) ; do go test -tags $$tag -v ./... ; done && touch $@
|
set -e ; for tag in $(TAGS) ; do go test -tags $$tag -v $$(glide novendor) ; done && touch $@
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: .lint
|
lint: .lint
|
||||||
|
@ -31,7 +32,7 @@ lint: .lint
|
||||||
CLEAN_FILES += .lint
|
CLEAN_FILES += .lint
|
||||||
|
|
||||||
.lint: $(SOURCE_FILES)
|
.lint: $(SOURCE_FILES)
|
||||||
golint -set_exit_status ./... && touch $@
|
set -e ; for dir in $$(glide novendor) ; do golint -set_exit_status $$dir ; done && touch $@
|
||||||
|
|
||||||
.PHONY: vet
|
.PHONY: vet
|
||||||
vet: .vet .vet.tags
|
vet: .vet .vet.tags
|
||||||
|
@ -39,10 +40,10 @@ vet: .vet .vet.tags
|
||||||
CLEAN_FILES += .vet .vet.tags
|
CLEAN_FILES += .vet .vet.tags
|
||||||
|
|
||||||
.vet: $(SOURCE_FILES)
|
.vet: $(SOURCE_FILES)
|
||||||
go vet ./... && touch $@
|
go vet $$(glide novendor) && touch $@
|
||||||
|
|
||||||
.vet.tags: $(SOURCE_FILES)
|
.vet.tags: $(SOURCE_FILES)
|
||||||
set -e ; for tag in $(TAGS) ; do go vet -tags $$tag -v ./... ; done && touch $@
|
set -e ; for tag in $(TAGS) ; do go vet -tags $$tag -v $$(glide novendor) ; done && touch $@
|
||||||
|
|
||||||
.PHONY: cli.test
|
.PHONY: cli.test
|
||||||
cli.test: .cli.test
|
cli.test: .cli.test
|
||||||
|
@ -59,7 +60,7 @@ CLEAN_FILES += .cli.test .cli.test.tags
|
||||||
build: $(BUILD)
|
build: $(BUILD)
|
||||||
|
|
||||||
$(BUILD): $(SOURCE_FILES)
|
$(BUILD): $(SOURCE_FILES)
|
||||||
go build ./cmd/$(BUILD)
|
go build -o $(BUILD) $(BUILDPATH)
|
||||||
|
|
||||||
./bin:
|
./bin:
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
|
@ -72,7 +73,7 @@ build.arches: ./bin
|
||||||
p=$$(echo $$pair | cut -d , -f 1);\
|
p=$$(echo $$pair | cut -d , -f 1);\
|
||||||
a=$$(echo $$pair | cut -d , -f 2);\
|
a=$$(echo $$pair | cut -d , -f 2);\
|
||||||
echo "Building $$p/$$a ...";\
|
echo "Building $$p/$$a ...";\
|
||||||
GOOS=$$p GOARCH=$$a go build -o ./bin/gomtree.$$p.$$a ./cmd/gomtree/ ;\
|
GOOS=$$p GOARCH=$$a go build -o ./bin/gomtree.$$p.$$a $(BUILDPATH) ;\
|
||||||
done
|
done
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Reference in a new issue