🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
fix(build): derive version from reachable git tag (#5711)
Deluan Quintãoe3297831125d
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.ymlindex 8a01dc028..228bac9e7 100644--- a/.github/workflows/pipeline.yml+++ b/.github/workflows/pipeline.yml@@ -32,7 +32,7 @@ jobs:- name: Show git version inforun: |echo "git describe (dirty): $(git describe --dirty --always --tags)"- echo "git describe --tags: $(git describe --tags `git rev-list --tags --max-count=1`)"+ echo "git describe --tags --abbrev=0: $(git describe --tags --abbrev=0)"echo "git tag: $(git tag --sort=-committerdate | head -n 1)"echo "github_ref: $GITHUB_REF"echo "github_head_sha: ${{ github.event.pull_request.head.sha }}"@@ -40,7 +40,7 @@ jobs:- name: Determine git current SHA and latest tagid: git-versionrun: |- GIT_TAG=$(git tag --sort=-committerdate | head -n 1)+ GIT_TAG=$(git describe --tags --abbrev=0 2>/dev/null || true)if [ -n "$GIT_TAG" ]; thenif [[ "$GITHUB_REF" != refs/tags/* ]]; thenGIT_TAG=${GIT_TAG}-SNAPSHOTdiff --git a/Makefile b/Makefileindex 90a405de8..fa0d10475 100644--- a/Makefile+++ b/Makefile@@ -9,7 +9,7 @@ export ND_ENABLEINSIGHTSCOLLECTOR=falseifneq ("$(wildcard .git/HEAD)","")GIT_SHA=$(shell git rev-parse --short HEAD)-GIT_TAG=$(shell git describe --tags `git rev-list --tags --max-count=1`)-SNAPSHOT+GIT_TAG=$(shell git describe --tags --abbrev=0 2>/dev/null || echo v0.0.0)-SNAPSHOTelseGIT_SHA=source_archiveGIT_TAG=$(patsubst navidrome-%,v%,$(notdir $(PWD)))-SNAPSHOT