diff options
author | Anton Ovchinnikov <anton@tonyo.info> | 2019-01-15 12:03:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-15 12:03:33 +0100 |
commit | d891c20f0f930153f508e9d698d9de42e910face (patch) | |
tree | 7b552ec0ffea81855a3e0e0d2c5dd76e279d7b9c /scripts/bump-version.sh | |
parent | 174c2838e8a024bac4761eb2b33d25ac6629a0a6 (diff) | |
download | raven-d891c20f0f930153f508e9d698d9de42e910face.tar.gz |
ci: Use craft for publishing new releases (#1346)
* ci: Use craft for publishing new releases
* fix: Update .craft.yml
* fix: Remove probot conf files
Diffstat (limited to 'scripts/bump-version.sh')
-rwxr-xr-x | scripts/bump-version.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/bump-version.sh b/scripts/bump-version.sh new file mode 100755 index 0000000..5e6e19c --- /dev/null +++ b/scripts/bump-version.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -eux + +SCRIPT_DIR="$( dirname "$0" )" +cd $SCRIPT_DIR/.. + +OLD_VERSION="${1}" +NEW_VERSION="${2}" + +echo "Current version: $OLD_VERSION" +echo "Bumping version: $NEW_VERSION" + +function replace() { + ! grep "$2" $3 + perl -i -pe "s/$1/$2/g" $3 + grep "$2" $3 # verify that replacement was successful +} + +replace "current_version = [0-9.]+" "current_version = $NEW_VERSION" ./.bumpversion.cfg +replace "VERSION = '[0-9.]+'" "VERSION = '$NEW_VERSION'" ./raven/__init__.py |