From 0e576761f44a82230d4cf2a9cd59585ee37ce862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Tue, 7 Dec 2021 09:49:22 -0500 Subject: [PATCH] Makefile: generate unique tarballs Change-Id: I8d78545a23e75d7d9ca016eb00cea3e3094c73ac --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9ddfba7c..a23783f2 100644 --- a/Makefile +++ b/Makefile @@ -29,17 +29,17 @@ TARBALL_VERSION := $(shell cat $(CURDIR)/.tarball-version 2> /dev/null) ifeq ($(TARBALL_VERSION),) # YYYY-MM-DD LAST_COMMIT_DATE:=$(shell git log -1 --format=%cd --date=short) - -# number of commits that day -NUMBER_OF_COMMITS:=$(shell git log --format=%cd --date=short | grep -c $(LAST_COMMIT_DATE)) +CURRENT_DATE:=$(shell date +"%Y-%m-%d") +VERSION_NUMBER:=$(shell date +"%H%M") # YYMMDD -LAST_COMMIT_DATE_SHORT:=$(shell echo $(LAST_COMMIT_DATE) | sed -s 's/-//g') +CURRENT_DATE_SHORT:=$(shell echo $(CURRENT_DATE) | sed -s 's/-//g') # last commit id COMMIT_ID:=$(shell git rev-parse --short HEAD) -RELEASE_VERSION:=$(LAST_COMMIT_DATE_SHORT).$(NUMBER_OF_COMMITS).$(COMMIT_ID) +RELEASE_VERSION:=$(CURRENT_DATE_SHORT).$(VERSION_NUMBER).$(COMMIT_ID) + else $(warning Using version from the .tarball-version file: $(TARBALL_VERSION)) RELEASE_VERSION:=$(TARBALL_VERSION) -- GitLab