diff --git a/Makefile b/Makefile index a23783f2ceebdbbf470b5d3deb3f58643b9bc736..271dd344596fdd7d84c91e6604f4829f1ba99eb2 100644 --- a/Makefile +++ b/Makefile @@ -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))