Skip to content

Commit

Permalink
feat: add bumpversion release candidate support
Browse files Browse the repository at this point in the history
  • Loading branch information
germanattanasio committed Nov 10, 2020
1 parent 5095e42 commit b794bb6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
26 changes: 9 additions & 17 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
[bumpversion]
current_version = 9.0.0-rc.1
current_version = 9.0.0
commit = True
message = Update version numbers from {current_version} -> {new_version}
search = {current_version}
replace = {new_version}

[bumpversion:file:gradle.properties]
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<rc>\-rc\.\d+)?
serialize =
{major}.{minor}.{patch}{rc}
{major}.{minor}.{patch}

[bumpversion:file:gradle.properties]
[bumpversion:file:README.md]

[bumpversion:file:assistant/README.md]

[bumpversion:file:compare-comply/README.md]

[bumpversion:file:discovery/README.md]

[bumpversion:file:language-translator/README.md]

[bumpversion:file:natural-language-classifier/README.md]

[bumpversion:file:natural-language-understanding/README.md]

[bumpversion:file:personality-insights/README.md]

[bumpversion:file:speech-to-text/README.md]

[bumpversion:file:text-to-speech/README.md]

[bumpversion:file:tone-analyzer/README.md]

[bumpversion:file:visual-recognition/README.md]

[bumpversion:file:docker/pom.xml]

[bumpversion:file:examples/build.gradle]
search = {current_version}
replace = {new_version}


2 changes: 1 addition & 1 deletion .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
[
"@semantic-release/exec",
{
"prepareCmd": "bumpversion --current-version ${lastRelease.version} --new-version ${nextRelease.version} --allow-dirty patch"
"prepareCmd": ".utility/bumpversion.sh ${lastRelease.version} ${nextRelease.version}"
}
],
[
Expand Down
11 changes: 11 additions & 0 deletions .utility/bumpversion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -e

VERSION="patch"

if [ "${TRAVIS_BRANCH}" != "master" ]; then
VERSION="rc"
fi

bumpversion --current-version $1 --new-version $2 --allow-dirty $VERSION --verbose

0 comments on commit b794bb6

Please sign in to comment.