diff --git a/.circleci/config.yml b/.circleci/config.yml index d28429dc4be9..d1761faa53fb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -209,9 +209,16 @@ jobs: - run: | cd /tmp/workspace/distribution-scripts - # How to brand it - export VERSION=${CIRCLE_BRANCH/release\//} - export VERSION=${VERSION//\//-}-dev + # The version is based on the branch name. + VERSION=$CIRCLE_BRANCH + + # We need to sanitize it because there are restrictions on some places + # where the version is use (Mac pkg names, snap branch). + VERSION=${VERSION/release\//} + VERSION=${VERSION//_/-} + VERSION=${VERSION//\//-}-dev + + export VERSION echo "export CRYSTAL_VERSION=$VERSION" >> build.env echo "export DOCKER_TAG=$VERSION" >> build.env