Skip to content

Commit

Permalink
[CI] Sanitize version from branch name (#11294)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Oct 8, 2021
1 parent 33f6ded commit 175d443
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 175d443

Please sign in to comment.