make bootstrap installs git hooks pre-push by default

This commit is contained in:
Lang Martin 2019-04-17 15:28:17 -07:00
parent 50cb734cf7
commit 51f826af60
1 changed files with 8 additions and 1 deletions

View File

@ -133,7 +133,7 @@ endef
$(foreach t,$(ALL_TARGETS),$(eval $(call makePackageTarget,$(t))))
.PHONY: bootstrap
bootstrap: deps lint-deps # Install all dependencies
bootstrap: deps lint-deps git-hooks # Install all dependencies
.PHONY: deps
deps: ## Install build and development dependencies
@ -153,6 +153,13 @@ lint-deps: ## Install linter dependencies
go get -u github.com/alecthomas/gometalinter
gometalinter --install
.PHONY: git-hooks
git-dir = $(shell git rev-parse --git-dir)
git-hooks: $(git-dir)/hooks/pre-push
$(git-dir)/hooks/%: dev/hooks/%
cp $^ $@
chmod 755 $@
.PHONY: check
check: ## Lint the source code
@echo "==> Linting source code..."