Skip to content

Commit 9174813

Browse files
committed
Fix the tag generation so there isn't a random hyphen
Signed-off-by: Anish Asthana <[email protected]>
1 parent 0407876 commit 9174813

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@ endif
2020

2121
# Check for current branch name
2222
ifneq ($(strip $(GIT_BRANCH)),)
23-
TAG:=${TAG}${GIT_BRANCH}-
23+
TAG:=${TAG}${GIT_BRANCH}
2424

2525
# replace invalid characters that might exist in the branch name
2626
TAG:=$(shell echo ${TAG} | sed 's/[^a-zA-Z0-9]/-/g')
2727
endif
2828

2929
# Check if the string does not contain "release"
3030
ifeq (,$(findstring release,$(GIT_BRANCH)))
31-
TAG:=${TAG}${RELEASE_VER}
31+
TAG:=${TAG}-${RELEASE_VER}
32+
else
33+
TAG:=$(shell echo ${TAG} | sed 's/\(release-v[0-9]\)-\([0-9]*\)-\([0-9]*\)/\1.\2.\3/g')
3234
endif
3335

3436
.PHONY: print-global-variables

0 commit comments

Comments
 (0)