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
Branches
Tags
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment