aboutsummaryrefslogtreecommitdiffstats
path: root/release.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-08-17 15:46:35 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-08-17 15:46:35 -0400
commit271dfce00c557029b348a170c9eab15e9f3a430b (patch)
tree300e4bf18a88537251ce8c765b9108f085e6a7ef /release.py
parent3ce0aff78df0d02864946a34a622dd08d7a29c5b (diff)
downloadexternal_python_setuptools-271dfce00c557029b348a170c9eab15e9f3a430b.tar.gz
external_python_setuptools-271dfce00c557029b348a170c9eab15e9f3a430b.tar.bz2
external_python_setuptools-271dfce00c557029b348a170c9eab15e9f3a430b.zip
Refactor for clarity
Diffstat (limited to 'release.py')
-rw-r--r--release.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/release.py b/release.py
index 221d8a67..4c9df8cc 100644
--- a/release.py
+++ b/release.py
@@ -15,6 +15,9 @@ def before_upload():
_linkify('CHANGES.txt', 'CHANGES (links).txt')
_add_bootstrap_bookmark()
+def after_push():
+ _push_bootstrap_bookmark()
+
files_with_versions = (
'ez_setup.py', 'setuptools/version.py',
)
@@ -23,17 +26,6 @@ test_info = "Travis-CI tests: http://travis-ci.org/#!/jaraco/setuptools"
os.environ["SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES"] = "1"
-# override the push command to include the bootstrap bookmark.
-def after_push():
- """
- Push the bootstrap bookmark
- """
- push_command = ['hg', 'push', '-B', 'bootstrap']
- # 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)
-
link_patterns = [
r"(Issue )?#(?P<issue>\d+)",
r"Distribute #(?P<distribute>\d+)",
@@ -73,3 +65,13 @@ def replacer(match):
def _add_bootstrap_bookmark():
cmd = ['hg', 'bookmark', '-i', 'bootstrap', '-f']
subprocess.Popen(cmd)
+
+def _push_bootstrap_bookmark():
+ """
+ Push the bootstrap bookmark
+ """
+ push_command = ['hg', 'push', '-B', 'bootstrap']
+ # 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)