From b8eb22d162deb810465dcd7d96ee1d96962f50b3 Mon Sep 17 00:00:00 2001
From: Deluan <deluan@deluan.com>
Date: Fri, 3 Apr 2020 16:00:17 -0400
Subject: [PATCH] Add git hooks on check_env

---
 Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index e9faa1b03..4e0f1479a 100644
--- a/Makefile
+++ b/Makefile
@@ -39,8 +39,6 @@ setup: Jamstash-master
 	@which goose      || (echo "Installing Goose"    && GO111MODULE=off go get -u github.com/pressly/goose/cmd/goose)
 	@which lefthook   || (echo "Installing Lefthook" && GO111MODULE=off go get -u github.com/Arkweid/lefthook)
 	@lefthook install
-	@lefthook add pre-commit
-	@lefthook add pre-push
 	go mod download
 	@(cd ./ui && npm ci)
 .PHONY: setup
@@ -57,6 +55,11 @@ Jamstash-master:
 check_env: check_go_env check_node_env
 .PHONE: check_env
 
+check_hooks:
+	@lefthook add pre-commit
+	@lefthook add pre-push
+.PHONE: check_hooks
+
 check_go_env:
 	@(hash go) || (echo "\nERROR: GO environment not setup properly!\n"; exit 1)
 	@go version | grep -q $(GO_VERSION) || (echo "\nERROR: Please upgrade your GO version\nThis project requires version $(GO_VERSION)"; exit 1)