1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2024-11-16 05:18:38 +00:00
tar-split/Makefile
Vincent Batts b83c40e7f9
test: add basic cli test
tar and filesystem check

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-11-07 10:40:12 -05:00

45 lines
722 B
Makefile

BUILD := gomtree
CWD := $(shell pwd)
SOURCE_FILES := $(shell find . -type f -name "*.go")
default: validation build
.PHONY: validation
validation: test lint vet .cli.test
.PHONY: test
test: .test
.test: $(SOURCE_FILES)
go test -v ./... && touch $@
.PHONY: lint
lint: .lint
.lint: $(SOURCE_FILES)
golint -set_exit_status ./... && touch $@
.PHONY: vet
vet: .vet
.vet: $(SOURCE_FILES)
go vet ./... && touch $@
.PHONY: cli.test
cli.test: .cli.test
.cli.test: $(BUILD) $(wildcard ./test/cli/*.sh)
@ for test in ./test/cli/*.sh ; do \
bash $$test $(CWD) ; \
done && touch $@
.PHONY: build
build: $(BUILD)
$(BUILD): $(SOURCE_FILES)
go build ./cmd/$(BUILD)
clean:
rm -rf $(BUILD) .test .vet .lint .cli.test