mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-05 13:37:38 +03:00
Add git hooks on check_env
This commit is contained in:
parent
9b461735f4
commit
b8eb22d162
1 changed files with 5 additions and 2 deletions
7
Makefile
7
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 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)
|
@which lefthook || (echo "Installing Lefthook" && GO111MODULE=off go get -u github.com/Arkweid/lefthook)
|
||||||
@lefthook install
|
@lefthook install
|
||||||
@lefthook add pre-commit
|
|
||||||
@lefthook add pre-push
|
|
||||||
go mod download
|
go mod download
|
||||||
@(cd ./ui && npm ci)
|
@(cd ./ui && npm ci)
|
||||||
.PHONY: setup
|
.PHONY: setup
|
||||||
|
@ -57,6 +55,11 @@ Jamstash-master:
|
||||||
check_env: check_go_env check_node_env
|
check_env: check_go_env check_node_env
|
||||||
.PHONE: check_env
|
.PHONE: check_env
|
||||||
|
|
||||||
|
check_hooks:
|
||||||
|
@lefthook add pre-commit
|
||||||
|
@lefthook add pre-push
|
||||||
|
.PHONE: check_hooks
|
||||||
|
|
||||||
check_go_env:
|
check_go_env:
|
||||||
@(hash go) || (echo "\nERROR: GO environment not setup properly!\n"; exit 1)
|
@(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)
|
@go version | grep -q $(GO_VERSION) || (echo "\nERROR: Please upgrade your GO version\nThis project requires version $(GO_VERSION)"; exit 1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue