Skip to content

Commit b68f618

Browse files
committed
Added update_version.sh script
This script updates the Python-RSA version number in various places.
1 parent fcf5b74 commit b68f618

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

update_version.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
if [ -z "$1" ]; then
4+
echo "Usage: $0 new-version" >&2
5+
exit 1
6+
fi
7+
8+
DATE=$(date +'%Y-%m-%d')
9+
10+
sed "s/__date__\s=\s'[^']*'/__date__ = '$DATE'/" -i rsa/__init__.py
11+
sed "s/__version__\s=\s'[^']*'/__version__ = '$1'/" -i rsa/__init__.py
12+
13+
poetry version $1
14+
15+
git diff
16+
echo
17+
echo "Don't forget to commit and tag:"
18+
echo git commit -m \'Bumped version to $1\' pyproject.toml rsa/__init__.py
19+
echo git tag -a version-$1 -m \'Tagged version $1\'

0 commit comments

Comments
 (0)