diff --git a/.travis.yml b/.travis.yml index 25ba43e..d60f684 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: go go: - - 1.7.3 + - 1.7.4 - 1.6.3 sudo: false @@ -15,3 +15,4 @@ install: true script: - make validation + - make validation.tags diff --git a/Makefile b/Makefile index b80448f..071de49 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,13 @@ TAGS := cvis default: build validation .PHONY: validation -validation: test .lint .vet .cli.test +validation: .test .lint .vet .cli.test + +.PHONY: validation.tags +validation.tags: .test.tags .vet.tags .cli.test .PHONY: test -test: .test .test.tags +test: .test CLEAN_FILES += .test .test.tags @@ -19,19 +22,16 @@ CLEAN_FILES += .test .test.tags go test -v ./... && touch $@ .test.tags: $(SOURCE_FILES) - for tag in $(TAGS) ; do go test -tags $$tag -v ./... ; done && touch $@ + set -e ; for tag in $(TAGS) ; do go test -tags $$tag -v ./... ; done && touch $@ .PHONY: lint -lint: .lint .lint.tags +lint: .lint -CLEAN_FILES += .lint .lint.tags +CLEAN_FILES += .lint .lint: $(SOURCE_FILES) golint -set_exit_status ./... && touch $@ -.lint.tags: $(SOURCE_FILES) - for tag in $(TAGS) ; do golint -set_exit_status -tags $$tag -v ./... ; done && touch $@ - .PHONY: vet vet: .vet .vet.tags @@ -41,16 +41,19 @@ CLEAN_FILES += .vet .vet.tags go vet ./... && touch $@ .vet.tags: $(SOURCE_FILES) - for tag in $(TAGS) ; do go vet -tags $$tag -v ./... ; done && touch $@ + set -e ; for tag in $(TAGS) ; do go vet -tags $$tag -v ./... ; done && touch $@ .PHONY: cli.test cli.test: .cli.test -CLEAN_FILES += .cli.test +CLEAN_FILES += .cli.test .cli.test.tags .cli.test: $(BUILD) $(wildcard ./test/cli/*.sh) @go run ./test/cli.go ./test/cli/*.sh && touch $@ +.cli.test.tags: $(BUILD) $(wildcard ./test/cli/*.sh) + @set -e ; for tag in $(TAGS) ; do go run -tags $$tag ./test/cli.go ./test/cli/*.sh ; done && touch $@ + .PHONY: build build: $(BUILD)