Skip to content

Commit c5c52a3

Browse files
committed
ci: replace backslashes with dash in branches before creating a semver tag
1 parent 4a71120 commit c5c52a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ jobs:
267267
# - PR builds pass the branch name in as release_ref, so massage it if it is missing a semver prefix.
268268
echo "Branch (PR) build detected, sanitizing release tag..."
269269
LAST_SEMVER_TAG=$(git describe --tags --match 'v*.*.*' --abbrev=0 | cut -d"-" -f1)
270-
RELEASE_REF="${LAST_SEMVER_TAG}-<< parameters.release_ref >>"
270+
BRANCH_NAME=$(echo "<< parameters.release_ref >>" | sed 's/\//-/g')
271+
RELEASE_REF="${LAST_SEMVER_TAG}-${BRANCH_NAME}"
271272
fi
272273
echo "Will use RELEASE_REF=${RELEASE_REF}"
273274
echo "export RELEASE_REF=${RELEASE_REF}" >> $BASH_ENV

0 commit comments

Comments
 (0)