summaryrefslogtreecommitdiff
path: root/release.py
diff options
context:
space:
mode:
authorPhilip Thiem <ptthiem@gmail.com>2013-09-28 12:33:19 -0500
committerPhilip Thiem <ptthiem@gmail.com>2013-09-28 12:33:19 -0500
commit78f01306a08285e9f2abe6ad749f6ce884e12555 (patch)
treec4769869539d5ae9101a7e8e76a46e9e292b9b97 /release.py
parent30bb58f069cf1624f35cfbdb725e8e443ff64330 (diff)
parent49ce80613b7fcffd1882f7fb082e5bcc30e976f0 (diff)
downloadpython-setuptools-git-78f01306a08285e9f2abe6ad749f6ce884e12555.tar.gz
Merge with default
--HG-- extra : rebase_source : d9c70d5bebd4290f568c828c5bc3a9b93a817ff2
Diffstat (limited to 'release.py')
-rw-r--r--release.py33
1 files changed, 28 insertions, 5 deletions
diff --git a/release.py b/release.py
index bad7e0ee..15f71a2d 100644
--- a/release.py
+++ b/release.py
@@ -7,13 +7,22 @@ import re
import os
import subprocess
+import pkg_resources
+
+pkg_resources.require('jaraco.packaging>=2.0')
+
def before_upload():
_linkify('CHANGES.txt', 'CHANGES (links).txt')
- _add_bootstrap_bookmark()
+ BootstrapBookmark.add()
+
+
+def after_push():
+ os.remove('CHANGES (links).txt')
+ BootstrapBookmark.push()
files_with_versions = (
- 'ez_setup.py', 'setuptools/__init__.py',
+ 'ez_setup.py', 'setuptools/version.py',
)
test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools"
@@ -55,7 +64,21 @@ def replacer(match):
url = issue_urls[key].format(**match_dict)
return "`{text} <{url}>`_".format(text=text, url=url)
+class BootstrapBookmark:
+ name = 'bootstrap'
+
+ @classmethod
+ def add(cls):
+ cmd = ['hg', 'bookmark', '-i', cls.name, '-f']
+ subprocess.Popen(cmd)
-def _add_bootstrap_bookmark():
- cmd = ['hg', 'bookmark', '-i', 'bootstrap', '-f']
- subprocess.Popen(cmd)
+ @classmethod
+ def push(cls):
+ """
+ Push the bootstrap bookmark
+ """
+ push_command = ['hg', 'push', '-B', cls.name]
+ # don't use check_call here because mercurial will return a non-zero
+ # code even if it succeeds at pushing the bookmark (because there are
+ # no changesets to be pushed). !dm mercurial
+ subprocess.call(push_command)