We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84b1719 commit 264cdc5Copy full SHA for 264cdc5
Makefile
@@ -4,7 +4,7 @@ PYTHON ?= /usr/bin/python3
4
OS_CODENAME ?= $(shell grep VERSION_CODENAME= /etc/os-release | cut -f2 -d=)
5
6
ifneq ("$(wildcard .git)","")
7
- RELEASE ?= $(shell git describe --all --match master --match 'release-*' --abbrev=0 HEAD | sed 's@heads/@@g')
+ RELEASE ?= $(or $(shell git describe --all --match master --match 'release-*' --abbrev=0 HEAD 2>/dev/null | sed 's@heads/@@g'), branch)
8
COMMIT ?= $(shell git rev-parse HEAD)
9
SOURCE_DATE_EPOCH ?= $(or $(shell git show -s --format="%ct" $(COMMIT)), $(shell date "+%s"))
10
VERSION ?= $(shell $(PYTHON) ./version.py $(SOURCE_DATE_EPOCH) $(RELEASE))
0 commit comments