Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
cutarelease.py: from __future__ import print_function
  • Loading branch information
cclauss authored Jan 25, 2025
commit 7594394773f1167f3b2ab4b528eea16d1e2d15cd
9 changes: 5 additions & 4 deletions tools/cutarelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Conventions:
- XXX
"""
from __future__ import print_function

__version_info__ = (1, 0, 7)
__version__ = '.'.join(map(str, __version_info__))
Expand Down Expand Up @@ -112,7 +113,7 @@ def cutarelease(project_name, version_files, dry_run=False):
"Are you sure you want cut a %s release?\n"
"This will involved commits and a push." % version,
default="no")
print "* * *"
print("* * *")
if answer != "yes":
log.info("user abort")
return
Expand All @@ -136,7 +137,7 @@ def cutarelease(project_name, version_files, dry_run=False):
"The changelog '%s' top section doesn't have the expected\n"
"'%s' marker. Has this been released already?"
% (changes_path, nyr), default="yes")
print "* * *"
print("* * *")
if answer != "no":
log.info("abort")
return
Expand Down Expand Up @@ -167,15 +168,15 @@ def cutarelease(project_name, version_files, dry_run=False):
# Optionally release.
if exists("package.json"):
answer = query_yes_no("\n* * *\nPublish to npm?", default="yes")
print "* * *"
print("* * *")
if answer == "yes":
if dry_run:
log.info("skipping npm publish (dry-run)")
else:
run('npm publish')
elif exists("setup.py"):
answer = query_yes_no("\n* * *\nPublish to pypi?", default="yes")
print "* * *"
print("* * *")
if answer == "yes":
if dry_run:
log.info("skipping pypi publish (dry-run)")
Expand Down