feat(version): permit branch name overwrite
Cadoles/mktools/pipeline/head This commit looks good Details

This commit is contained in:
wpetit 2023-08-24 11:17:41 -06:00
parent fa2dab537e
commit 1de7156649
1 changed files with 5 additions and 4 deletions

View File

@ -1,11 +1,12 @@
MKT_PROJECT_BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD | tr '[:upper:]' '[:lower:]' | sed -e 's/[-_ ]//g') MKT_PROJECT_BRANCH_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
MKT_PROJECT_CLEANED_BRANCH_NAME ?= $(shell echo $(MKT_PROJECT_BRANCH_NAME) | tr '[:upper:]' '[:lower:]' | sed -e 's/[-_ ]//g')
ifeq ($(MKT_PROJECT_BRANCH_NAME),master) ifeq ($(MKT_PROJECT_CLEANED_BRANCH_NAME),master)
MKT_PROJECT_VERSION_CHANNEL = stable MKT_PROJECT_VERSION_CHANNEL = stable
else ifeq ($(MKT_PROJECT_BRANCH_NAME),staging) else ifeq ($(MKT_PROJECT_CLEANED_BRANCH_NAME),staging)
MKT_PROJECT_VERSION_CHANNEL = testing MKT_PROJECT_VERSION_CHANNEL = testing
else else
MKT_PROJECT_VERSION_CHANNEL = $(MKT_PROJECT_BRANCH_NAME) MKT_PROJECT_VERSION_CHANNEL = $(MKT_PROJECT_CLEANED_BRANCH_NAME)
endif endif