From b407646464a86c2d87fdf548a395167fb92d1011 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Fri, 26 Apr 2024 16:51:22 +0200 Subject: [PATCH] Fix build version detection: Ignore continuous tag properly (#724) --- distribute/distribute.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/distribute/distribute.sh b/distribute/distribute.sh index 4cc44acd..0b7c4606 100755 --- a/distribute/distribute.sh +++ b/distribute/distribute.sh @@ -58,7 +58,13 @@ else if [[ "$VERSION" != "" ]]; then log "Using properties-provided version $VERSION" else - VERSION="$(git describe --tags || echo unknown)+devel" + # as the GitHub actions workflow creates a continuous tag on the main branch's HEAD to create prereleases for every push, we must ignore those tags + # we need to ignore this tag to get a proper version number + # if the command fails, we must abort at this point, as we cannot fall back to some generic name like "unknown" without breaking at least the Debian package build + if ! VERSION="$(git describe --tags --exclude 'continuous')+devel"; then + echo "Error: could not fetch proper version number with git, try git fetch -a" + exit 2 + fi fi popd