From 2640928eb6db265c78eef645b23d62a770d511af Mon Sep 17 00:00:00 2001 From: Henning Jacobs Date: Fri, 26 Jun 2015 09:54:08 +0200 Subject: [PATCH] release helper script --- README.md | 6 ++++++ release.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100755 release.sh diff --git a/README.md b/README.md index a786f29..64099dc 100644 --- a/README.md +++ b/README.md @@ -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 + + License ------- diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..9328cd8 --- /dev/null +++ b/release.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +if [ $# -ne 1 ]; then + >&2 echo "usage: $0 " + 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