🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Add lefthook for handling git hooks
Deluan63bf49b3c422
diff --git a/Makefile b/Makefileindex 9ec00599e..e9faa1b03 100644--- a/Makefile+++ b/Makefile@@ -37,6 +37,10 @@ setup: Jamstash-master@which goreman || (echo "Installing Goreman" && GO111MODULE=off go get -u github.com/mattn/goreman)@which ginkgo || (echo "Installing Ginkgo" && GO111MODULE=off go get -u github.com/onsi/ginkgo/ginkgo)@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-pushgo mod download@(cd ./ui && npm ci).PHONY: setupdiff --git a/lefthook.yml b/lefthook.ymlnew file mode 100644index 000000000..5e2d8a449--- /dev/null+++ b/lefthook.yml@@ -0,0 +1,13 @@+pre-push:+ commands:+ unit-tests:+ tags: tests+ run: go test ./...++pre-commit:+ parallel: false+ commands:+ gofmt:+ tags: style+ glob: "*.go"+ run: gofmt -w {staged_files}