fixup! chore: use branch name for tag, if master or support branch
@@ -143,12 +143,12 @@ jobs:
- run:
name: Compute Tag for Docker images
command: |
- if [[${CIRCLE_BRANCH} =~ ^(\d+\.\d+\.x|master)$ ]];
+ if [[ $CIRCLE_BRANCH =~ ^([0-9]+\.[0-9]+\.x|master)$ ]]
then
+ export TAG=${CIRCLE_BRANCH}
+ else
# Compute tag with branch name, commmit SHA and timestamp. Then slugify it to be sure it can be handled by Docker
export TAG=${APIM_VERSION}-$(echo "${CIRCLE_BRANCH:0:15}" | sed -E 's/[~^]+//g' | sed -E 's/[^a-zA-Z0-9]+/-/g' | sed -E 's/^-+|-+$//g' | tr A-Z a-z)-${CIRCLE_SHA1:0:7}
- else
- export TAG=${CIRCLE_BRANCH}
fi
# Workaround for sharing this variable to the next steps
echo "export TAG=$TAG" >> $BASH_ENV
