Skip to content
Snippets Groups Projects
Commit 0e576761 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

Makefile: generate unique tarballs

Change-Id: I8d78545a23e75d7d9ca016eb00cea3e3094c73ac
parent c3c2cc4b
No related branches found
No related tags found
No related merge requests found
...@@ -29,17 +29,17 @@ TARBALL_VERSION := $(shell cat $(CURDIR)/.tarball-version 2> /dev/null) ...@@ -29,17 +29,17 @@ TARBALL_VERSION := $(shell cat $(CURDIR)/.tarball-version 2> /dev/null)
ifeq ($(TARBALL_VERSION),) ifeq ($(TARBALL_VERSION),)
# YYYY-MM-DD # YYYY-MM-DD
LAST_COMMIT_DATE:=$(shell git log -1 --format=%cd --date=short) LAST_COMMIT_DATE:=$(shell git log -1 --format=%cd --date=short)
CURRENT_DATE:=$(shell date +"%Y-%m-%d")
# number of commits that day VERSION_NUMBER:=$(shell date +"%H%M")
NUMBER_OF_COMMITS:=$(shell git log --format=%cd --date=short | grep -c $(LAST_COMMIT_DATE))
# YYMMDD # 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 # last commit id
COMMIT_ID:=$(shell git rev-parse --short HEAD) 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 else
$(warning Using version from the .tarball-version file: $(TARBALL_VERSION)) $(warning Using version from the .tarball-version file: $(TARBALL_VERSION))
RELEASE_VERSION:=$(TARBALL_VERSION) RELEASE_VERSION:=$(TARBALL_VERSION)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment