feat(version): export variables for use in subshells
Cadoles/mktools/pipeline/head This commit looks good Details

This commit is contained in:
wpetit 2023-11-15 13:51:44 +01:00
parent 88db548371
commit 6eeb67261f
1 changed files with 5 additions and 2 deletions

View File

@ -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_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_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_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_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 .PHONY: mkt-project-version
mkt-project-version: mkt-project-version: