Skip to content

Commit fdda229

Browse files
committed
Fix release name evaluation
1 parent 264cdc5 commit fdda229

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ PYTHON ?= /usr/bin/python3
44
OS_CODENAME ?= $(shell grep VERSION_CODENAME= /etc/os-release | cut -f2 -d=)
55

66
ifneq ("$(wildcard .git)","")
7-
RELEASE ?= $(or $(shell git describe --all --match master --match 'release-*' --abbrev=0 HEAD 2>/dev/null | sed 's@heads/@@g'), branch)
7+
RELEASE ?= $(or $(shell git rev-parse --abbrev-ref HEAD | grep -v '^stable$$'),\
8+
$(shell git describe --all --match 'release-*' --match 'origin/release-*' --abbrev=0 HEAD 2>/dev/null | grep -o '[^/]*$$'),\
9+
unknown)
810
COMMIT ?= $(shell git rev-parse HEAD)
911
SOURCE_DATE_EPOCH ?= $(or $(shell git show -s --format="%ct" $(COMMIT)), $(shell date "+%s"))
1012
VERSION ?= $(shell $(PYTHON) ./version.py $(SOURCE_DATE_EPOCH) $(RELEASE))

0 commit comments

Comments
 (0)