1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-25 17:45:39 +00:00

make: add a specific target for tags

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2016-12-07 20:03:41 -05:00
parent e2575bffa5
commit 83dff044b3
2 changed files with 15 additions and 11 deletions

View file

@ -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

View file

@ -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)