Skip to content
Snippets Groups Projects
Unverified Commit 37be4c3b authored by Sébastien Blin's avatar Sébastien Blin
Browse files

Makefile: reuse number of commits

else version seems broken.

Change-Id: I4059b4dfa752d4c608eafc485867af28f1232602
parent 0e576761
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,9 @@ ifeq ($(TARBALL_VERSION),)
# YYYY-MM-DD
LAST_COMMIT_DATE:=$(shell git log -1 --format=%cd --date=short)
CURRENT_DATE:=$(shell date +"%Y-%m-%d")
VERSION_NUMBER:=$(shell date +"%H%M")
# number of commits that day
NUMBER_OF_COMMITS:=$(shell git log --format=%cd --date=short | grep -c $(LAST_COMMIT_DATE))
# YYMMDD
CURRENT_DATE_SHORT:=$(shell echo $(CURRENT_DATE) | sed -s 's/-//g')
......@@ -38,7 +40,7 @@ CURRENT_DATE_SHORT:=$(shell echo $(CURRENT_DATE) | sed -s 's/-//g')
# last commit id
COMMIT_ID:=$(shell git rev-parse --short HEAD)
RELEASE_VERSION:=$(CURRENT_DATE_SHORT).$(VERSION_NUMBER).$(COMMIT_ID)
RELEASE_VERSION:=$(CURRENT_DATE_SHORT).$(NUMBER_OF_COMMITS).$(COMMIT_ID)
else
$(warning Using version from the .tarball-version file: $(TARBALL_VERSION))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment