Skip to content

Commit 79c27a2

Browse files
committed
Add version script
1 parent 7c30942 commit 79c27a2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

scripts/version.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
GIT_ROOT=$(git rev-parse --show-toplevel)
3+
CURRENT_DIR=$PWD
4+
cd $GIT_ROOT
5+
echo Updating version to $1
6+
sed -E -i.bak "s/version = \'[0-9]\.[0-9]\.[0-9]+\'/\version = \'$1\'/" setup.py
7+
grep -HEo "version = '[0-9]\.[0-9]\.[0-9]+'" setup.py
8+
sed -E -i.bak "s/VERSION = \"[0-9]\.[0-9]\.[0-9]+\"/\VERSION = \"$1\"/" cloudinary/__init__.py
9+
grep -HEo "VERSION = \"[0-9]\.[0-9]\.[0-9]+\"" cloudinary/__init__.py
10+
#git add setup.py cloudinary/__init__.py CHANGELOG.md
11+
#git commit -m "Version $1"
12+
#git tag -a $1 -m "Version $1"
13+
cd $CURRENT_DIR

0 commit comments

Comments
 (0)