Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
minamijoyo committed Aug 15, 2018
1 parent bda1ad1 commit 16b0376
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Makefile
@@ -0,0 +1,42 @@
NAME := tfschema

DEP := $(GOBIN)/dep
LINT := $(GOBIN)/golint
GORELEASER := $(GOBIN)/goreleaser

$(DEP): ; @go get github.com/golang/dep/cmd/dep
$(LINT): ; @go get github.com/golang/lint/golint
$(GORELEASER): ; @go get github.com/goreleaser/goreleaser

.DEFAULT_GOAL := build

.PHONY: deps
deps: $(DEP)
dep ensure

.PHONY: build
build: deps
go build -o bin/$(NAME)

.PHONY: install
install: deps
go install

.PHONY: lint
lint: $(LINT)
golint $$(go list ./... | grep -v /vendor/)

.PHONY: vet
vet:
go vet ./...

.PHONY: test
test: deps
go test ./...

.PHONY: check
check: lint vet test build

.PHONY: release
release: check $(GORELEASER)
goreleaser --rm-dist

0 comments on commit 16b0376

Please sign in to comment.