summaryrefslogtreecommitdiffstats
path: root/release.py
diff options
context:
space:
mode:
authorAmjith Ramanujam <amjith@newrelic.com>2014-12-18 10:33:14 -0800
committerAmjith Ramanujam <amjith@newrelic.com>2014-12-18 10:33:14 -0800
commitc74a9141fe06fe61a862e241330842c9d3397dfa (patch)
tree0436eaf35c3a829fb8cc54322ae19737bc7859e4 /release.py
parent2f4df27df2d0a9d927d1ee14df9181ebfdc09e17 (diff)
Make it Py3 compatible.
Diffstat (limited to 'release.py')
-rw-r--r--release.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/release.py b/release.py
index 2417978b..e6502b46 100644
--- a/release.py
+++ b/release.py
@@ -1,4 +1,5 @@
#!/usr/bin/env python
+from __future__ import print_function
import re
import ast
import subprocess
@@ -17,28 +18,28 @@ def version(version_file):
def commit_for_release(version_file, ver):
cmd = ['git', 'reset']
- print ' '.join(cmd)
+ print(' '.join(cmd))
subprocess.check_output(cmd)
cmd = ['git', 'add', version_file]
- print ' '.join(cmd)
+ print(' '.join(cmd))
subprocess.check_output(cmd)
cmd = ['git', 'commit', '--message', 'Releasing version %s' % ver]
- print ' '.join(cmd)
+ print(' '.join(cmd))
subprocess.check_output(cmd)
def create_git_tag(tag_name):
cmd = ['git', 'tag', tag_name]
- print ' '.join(cmd)
+ print(' '.join(cmd))
subprocess.check_output(cmd)
def register_with_pypi():
cmd = ['python', 'setup.py', 'register']
- print ' '.join(cmd)
+ print(' '.join(cmd))
subprocess.check_output(cmd)
def create_source_tarball():
cmd = ['python', 'setup.py', 'sdist']
- print ' '.join(cmd)
+ print(' '.join(cmd))
subprocess.check_output(cmd)
if __name__ == '__main__':
@@ -46,8 +47,8 @@ if __name__ == '__main__':
subprocess.check_output = lambda x: x
ver = version('pgcli/__init__.py')
- print ('Releasing Version:', ver)
- choice = raw_input('Are you sure? (Y/N)')
+ print('Releasing Version:', ver)
+ choice = raw_input('Are you sure? (y/N)')
if choice.lower() != 'y':
sys.exit(1)
commit_for_release('pgcli/__init__.py', ver)