Skip to content

Commit 183cbb1

Browse files
shahidhkecthiender
authored andcommitted
only deploy dev|release branches (#76)
* remove special characters from version string
1 parent 50165fc commit 183cbb1

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.circleci/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ refs:
2323
filters:
2424
branches:
2525
only: /^dev.*/
26+
filter_only_dev_release_branches: &filter_only_dev_release_branches
27+
filters:
28+
branches:
29+
only: /^(dev|release).*/
2630
filter_ignore_branches: &filter_ignore_branches
2731
filters:
2832
branches:
@@ -199,5 +203,6 @@ workflows:
199203
- test_and_build_cli
200204
- deploy:
201205
<<: *filter_only_vtags
206+
<<: *filter_only_dev_release_branches
202207
requires:
203208
- test_and_build_console

scripts/get-version-circleci.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ fi
2525

2626
if [ -z "$VERSION" ]; then VERSION="$($ROOT/get-version.sh)"; fi
2727

28+
VERSION="$(echo $VERSION | tr -cd '[[:alnum:]]._-')"
29+
2830
echo $VERSION

scripts/get-version.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ GIT_DIRTY=$(test -n "`git status --porcelain`" && echo "-dirty" || echo "")
88
VERSION="${GIT_TAG_EXACT}"
99
test -n "$VERSION" || VERSION="${GIT_BRANCH}-${GIT_SHA}${GIT_DIRTY}"
1010

11+
VERSION="$(echo $VERSION | tr -cd '[[:alnum:]]._-')"
12+
1113
echo "$VERSION"

0 commit comments

Comments
 (0)