From 85eacd21634b833dbd7ebf15fb5cbfc94be42dd4 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Sat, 5 Nov 2016 12:43:00 -0400 Subject: [PATCH] Makefile: add easy target for validation Hopefully soon adding integration tests for the cli Signed-off-by: Vincent Batts --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..acf4e18 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ + +SOURCE_FILES := $(shell find . -type f -name "*.go") + +default: validation build + +.PHONY: validation +validation: test lint vet + +.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: build +build: gomtree + +gomtree: $(SOURCE_FILES) + go build ./cmd/gomtree + +clean: + rm -rf gomtree +