From 6eeb67261f09311b257607cc6f0c3063dbe098b6 Mon Sep 17 00:00:00 2001 From: William Petit Date: Wed, 15 Nov 2023 13:51:44 +0100 Subject: [PATCH] feat(version): export variables for use in subshells --- tasks/version.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tasks/version.mk b/tasks/version.mk index 495dc91..bbcf78c 100644 --- a/tasks/version.mk +++ b/tasks/version.mk @@ -25,8 +25,11 @@ MKT_PROJECT_VERSION_COMMIT_TIMESTAMP ?= $(shell git show -s --format=%ct) MKT_PROJECT_VERSION_DATE ?= $(shell TZ=$(MKT_PROJECT_VERSION_TIMEZONE) date -d '@$(MKT_PROJECT_VERSION_COMMIT_TIMESTAMP)' +%Y.%-m.%-d) MKT_PROJECT_VERSION_TIMESTAMP ?= $(shell TZ=$(MKT_PROJECT_VERSION_TIMEZONE) 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) +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) + +export MKT_PROJECT_VERSION +export MKT_PROJECT_SHORT_VERSION .PHONY: mkt-project-version mkt-project-version: