ci: adjust git tags filtering
authorLuca BRUNO <luca.bruno@coreos.com>
Wed, 16 Nov 2022 16:09:24 +0000 (16:09 +0000)
committerLuca BRUNO <luca.bruno@coreos.com>
Mon, 21 Nov 2022 15:12:31 +0000 (15:12 +0000)
Another attempt at fixing logic for version detection in COPR.

ci/Makefile.dist-packaging
ci/make-git-snapshot.sh

index de77be6cbba139fe7595ae60150bfac3927177a2..6bbe5fe99179d0013a2cf6308f6b92cb4c0e2e15 100644 (file)
@@ -2,7 +2,7 @@
 
 mypath = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
 topsrcdir = $(shell git rev-parse --show-toplevel)
-GITREV = $(shell git describe --always --tags)
+GITREV = $(shell git describe --always --tags --match 'v2???.*')
 GITREV_FOR_PKG = $(shell echo "$(GITREV)" | sed -e 's,-,\.,g' -e 's,^v,,')
 
 PACKAGE ?= $(shell basename $(topsrcdir))
index acfdd6c259e969b0bdb5c23266d7ff6ba13b1e9c..22f65a50d77445794d83198725484ab1fb5058e7 100755 (executable)
@@ -3,7 +3,7 @@ set -xeuo pipefail
 
 TOP=$(git rev-parse --show-toplevel)
 GITREV=$(git rev-parse HEAD)
-gitdescribe=$(git describe --always --tags $GITREV)
+gitdescribe=$(git describe --always --tags --match 'v2???.*' $GITREV)
 version=$(echo "$gitdescribe" | sed -e 's,-,\.,g' -e 's,^v,,')
 name=libostree
 PKG_VER="${name}-${version}"