summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdo_release33
-rwxr-xr-xreleasescript.auto14
-rw-r--r--setup.py2
3 files changed, 35 insertions, 14 deletions
diff --git a/do_release b/do_release
new file mode 100755
index 0000000..b5aef19
--- /dev/null
+++ b/do_release
@@ -0,0 +1,33 @@
+#!/bin/bash
+#
+# Release the specified version.
+
+if [ "$#" -ne 1 ]; then
+ echo "usage: ${0##*/} [VERSION]"
+ exit 1
+fi
+
+if [ "$( git status --porcelain | wc -c)" -ne 0 ]; then
+ echo "ERROR: Outstanding local changes from git."
+ exit 1
+fi
+
+VERSION="$1"
+
+if [ -f /tmp/python-memcached-"$VERSION".tar.gz ]; then
+ echo "ERROR: Release files already in /tmp"
+ exit 1
+fi
+
+sed -ri 's/^(\s*version=).*$/\1"'"$VERSION"'",/' setup.py
+sed -ri 's/^(\s*__version__\s*=\s*).*$/\1"'"$VERSION"'"/' memcache.py
+sed -ri 's/^(\sVersion:\s*).*$/\1"'"$VERSION"'"/' PKG-INFO
+
+git tag -s "$VERSION"
+git push
+git push --tags
+
+cd /tmp
+release "$VERSION" python-memcached
+cd python-memcached-"$VERSION"
+python setup.py sdist bdist_wheel upload
diff --git a/releasescript.auto b/releasescript.auto
index e9d9141..c426685 100755
--- a/releasescript.auto
+++ b/releasescript.auto
@@ -2,16 +2,4 @@
#
# Run when the .tar file is created, updates the .spec file.
-dir=`pwd`
-rev=${dir##*-}
-
-echo "Updating files to $rev"
-sed --in-place 's/^Version: .*$/Version: '"$rev"/ PKG-INFO
-sed --in-place 's/^__version__ .*$/__version__ = "'"$rev"'"/' memcache.py
-
-pydoc -w ./memcache.py
-
-rm -f releasescript.auto
-
-python setup.py sdist bdist_wheel upload
-rm -rf *.pyc dist python_memcached.egg-info
+# All done in "do_release" now.
diff --git a/setup.py b/setup.py
index f105bf2..891a283 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ from setuptools import setup # noqa
setup(name="python-memcached",
- version="1.53",
+ version="1.58",
description="Pure python memcached client",
long_description=open("README.md").read(),
author="Evan Martin",