Skip to content

Commit 81dc0b1

Browse files
authored
Merge pull request #13 from getsentry/nikhars/feat/bump-version-script
feat(release): Add bump version script to automate version updates
2 parents 37efab4 + 44444e7 commit 81dc0b1

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

scripts/bump-version.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -eux
3+
4+
OLD_VERSION="${1}"
5+
NEW_VERSION="${2}"
6+
7+
echo "Current version: $OLD_VERSION"
8+
echo "Bumping version: $NEW_VERSION"
9+
10+
function replace() {
11+
! grep "$2" $3
12+
perl -i -pe "s/$1/$2/g" $3
13+
grep "$2" $3 # verify that replacement was successful
14+
}
15+
16+
replace "version=\"[0-9.]+\"" "version=\"$NEW_VERSION\"" ./setup.py

0 commit comments

Comments
 (0)