diff --git a/tasks/version.mk b/tasks/version.mk index 02b5e94..c6d3631 100644 --- a/tasks/version.mk +++ b/tasks/version.mk @@ -19,8 +19,9 @@ else MKT_PROJECT_SHORT_VERSION_CHANNEL ?= $(shell echo "$(MKT_PROJECT_VERSION_CHANNEL)" | sed -e 's/[aeiouy]//g' | cut -c1-3) endif -MKT_PROJECT_VERSION_DATE ?= $(shell date +%Y.%-m.%-d) -MKT_PROJECT_VERSION_TIMESTAMP ?= $(shell date +%-H%M) +MKT_PROJECT_VERSION_COMMIT_TIMESTAMP ?= $(shell git show -s --format=%ct) +MKT_PROJECT_VERSION_DATE ?= $(shell TZ=Europe/Paris date -d '@$(MKT_PROJECT_VERSION_COMMIT_TIMESTAMP)' +%Y.%-m.%-d) +MKT_PROJECT_VERSION_TIMESTAMP ?= $(shell TZ=Europe/Paris date -d '@$(MKT_PROJECT_VERSION_COMMIT_TIMESTAMP)' +%-H%M) MKT_PROJECT_VERSION ?= $(MKT_PROJECT_VERSION_DATE)-$(MKT_PROJECT_VERSION_CHANNEL).$(MKT_PROJECT_VERSION_TIMESTAMP).$(shell git rev-parse --short HEAD) MKT_PROJECT_SHORT_VERSION ?= $(MKT_PROJECT_VERSION_DATE)-$(MKT_PROJECT_SHORT_VERSION_CHANNEL).$(MKT_PROJECT_VERSION_TIMESTAMP)