🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Converted pre-push hook into a make target, avoid calling tests twice when releasing
Deluana99924ea200f
diff --git a/Makefile b/Makefileindex afec28da2..474d16538 100644--- a/Makefile+++ b/Makefile@@ -86,13 +86,20 @@ buildall: check_envgo build -ldflags="-X github.com/deluan/navidrome/consts.gitSha=$(GIT_SHA) -X github.com/deluan/navidrome/consts.gitTag=$(GIT_TAG)-SNAPSHOT" -tags=embed.PHONY: buildall+pre-push:+ golangci-lint run -v++ @echo+ make test+.PHONY: pre-push+release:@if [[ ! "${V}" =~ ^[0-9]+\.[0-9]+\.[0-9]+.*$$ ]]; then echo "Usage: make release V=X.X.X"; exit 1; figo mod tidy@if [ -n "`git status -s`" ]; then echo "\n\nThere are pending changes. Please commit or stash first"; exit 1; fi- make test+ make pre-pushgit tag v${V}- git push origin v${V}+ git push origin v${V} --no-verify.PHONY: releasesnapshot:diff --git a/git/pre-push b/git/pre-pushindex 2d3acf253..da7eaba26 100755--- a/git/pre-push+++ b/git/pre-push@@ -1,9 +1,4 @@#!/bin/shset -e-echo "#### Linting"-golangci-lint run -v--echo-echo "#### Running tests"-make test\ No newline at end of file+make pre-push\ No newline at end of file