File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1010build
1111eggs
1212parts
13- bin
1413var
1514sdist
1615develop-eggs
Original file line number Diff line number Diff line change 1+ #! /bin/bash -ex
2+
3+ VERSION=" $1 "
4+ VERSION_FILE=socketio/__init__.py
5+
6+ if [[ " $VERSION " == " " ]]; then
7+ echo " Usage: $0 <version>"
8+ fi
9+
10+ sed -i " " " s/^__version__ = '.*'$/__version__ = '$VERSION '/" $VERSION_FILE
11+ rm -rf dist
12+ pip install --upgrade pip wheel twine
13+ python setup.py sdist bdist_wheel --universal
14+
15+ git add $VERSION_FILE
16+ git commit -m " Release $VERSION "
17+ git tag -f v$VERSION
18+ git push --tags origin master
19+
20+ read -p " Press any key to submit to PyPI or Ctrl-C to abort..." -n1 -s
21+ twine upload dist/*
22+
23+ NEW_VERSION=" ${VERSION% .* } .$(( ${VERSION##* .} + 1 )) dev"
24+ sed -i " " " s/^__version__ = '.*'$/__version__ = '$NEW_VERSION '/" $VERSION_FILE
25+ git add $VERSION_FILE
26+ git commit -m " Version $NEW_VERSION "
27+ git push origin master
28+ echo " Development is now open on version $NEW_VERSION !"
You can’t perform that action at this time.
0 commit comments