🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Extract version from directory name if .git dir is missing (#1327)
whorfin173b30cd5997
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.ymlindex a5487a816..49ac30808 100644--- a/.github/workflows/pipeline.yml+++ b/.github/workflows/pipeline.yml@@ -127,9 +127,6 @@ jobs:- name: Show Versionrun: git describe --tags- - name: Generate .gitinfo- run: make .gitinfo-- name: Run GoReleaser - SNAPSHOTif: startsWith(github.ref, 'refs/tags/') != trueuses: docker://deluan/ci-goreleaser:1.16.4-1diff --git a/Makefile b/Makefileindex 7965bb0da..4f0251178 100644--- a/Makefile+++ b/Makefile@@ -4,8 +4,9 @@ NODE_VERSION=$(shell cat .nvmrc)ifneq ("$(wildcard .git)","")GIT_SHA=$(shell git rev-parse --short HEAD)GIT_TAG=$(shell git describe --tags `git rev-list --tags --max-count=1`)-else ifneq ("$(wildcard .gitinfo)","")-include .gitinfo+else+GIT_SHA=source_archive+GIT_TAG=$(patsubst navidrome-%,v%,$(notdir $(PWD)))endifCI_RELEASER_VERSION=1.16.4-1 ## https://github.com/navidrome/ci-goreleaser@@ -99,11 +100,6 @@ single: ##@Cross_Compilation Build binaries for a single supported platforms. It############################################## Miscellaneous-.gitinfo:- @echo "export GIT_SHA=${GIT_SHA}" > .gitinfo- @echo "export GIT_TAG=${GIT_TAG}" >> .gitinfo-.PHONY: .gitinfo-release:@if [[ ! "${V}" =~ ^[0-9]+\.[0-9]+\.[0-9]+.*$$ ]]; then echo "Usage: make release V=X.X.X"; exit 1; figo mod tidy