Skip to content

Commit

Permalink
release helper script
Browse files Browse the repository at this point in the history
  • Loading branch information
hjacobs committed Jun 26, 2015
1 parent b5d8d58 commit 2640928
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ Hotkeys:
* `a`: auto-hide some of the fields from the PostgreSQL output. Currently, if this option is turned to on, the following fields can be hidden to leave space for the remaining ones: `type`, `s`, `utime`, `stime`, `guest`
* `h`: show the help screen

Releasing
---------

$ ./release.sh <NEW-VERSION>


License
-------

Expand Down
28 changes: 28 additions & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

if [ $# -ne 1 ]; then
>&2 echo "usage: $0 <version>"
exit 1
fi

set -xe

python --version
git --version

version=$1

sed -i "s/__version__ = .*/__version__ = '${version}'/" pg_view.py
python setup.py clean
python setup.py test
python setup.py flake8

git add pg_view.py

git commit -m "Bumped version to $version"
git push

python setup.py sdist upload

git tag ${version}
git push --tags

0 comments on commit 2640928

Please sign in to comment.