summaryrefslogtreecommitdiff
path: root/scripts/bump-version.sh
diff options
context:
space:
mode:
authorAnton Ovchinnikov <anton@tonyo.info>2019-01-15 12:03:33 +0100
committerGitHub <noreply@github.com>2019-01-15 12:03:33 +0100
commitd891c20f0f930153f508e9d698d9de42e910face (patch)
tree7b552ec0ffea81855a3e0e0d2c5dd76e279d7b9c /scripts/bump-version.sh
parent174c2838e8a024bac4761eb2b33d25ac6629a0a6 (diff)
downloadraven-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-xscripts/bump-version.sh20
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