From 37be4c3b397f4be69aaf99097660a93510119ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Tue, 7 Dec 2021 11:42:59 -0500 Subject: [PATCH] Makefile: reuse number of commits else version seems broken. Change-Id: I4059b4dfa752d4c608eafc485867af28f1232602 --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a23783f2..271dd344 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)) -- GitLab