Merge pull request #102 from vbatts/tags_target
make: add a specific target for tags
This commit is contained in:
commit
ca8faa91ae
2 changed files with 15 additions and 11 deletions
|
@ -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
|
||||
|
|
23
Makefile
23
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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue