Avoid accidental prod push

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2018-04-19 14:54:17 -07:00
parent 05afd5a2db
commit f248dbe280
1 changed files with 5 additions and 2 deletions

View File

@ -213,6 +213,8 @@ def finalize(args):
if not gh_release: if not gh_release:
raise ScriptError('No Github release draft for this version') raise ScriptError('No Github release draft for this version')
repository.checkout_branch(br_name)
pypandoc.convert_file( pypandoc.convert_file(
os.path.join(REPO_ROOT, 'README.md'), 'rst', outputfile=os.path.join(REPO_ROOT, 'README.rst') os.path.join(REPO_ROOT, 'README.md'), 'rst', outputfile=os.path.join(REPO_ROOT, 'README.rst')
) )
@ -222,8 +224,9 @@ def finalize(args):
if not merge_status.merged: if not merge_status.merged:
raise ScriptError('Unable to merge PR #{}: {}'.format(pr_data.number, merge_status.message)) raise ScriptError('Unable to merge PR #{}: {}'.format(pr_data.number, merge_status.message))
print('Uploading to PyPi') print('Uploading to PyPi')
run_setup(os.path.join(REPO_ROOT, 'setup.py'), script_args=['upload']) # TODO: this will do real stuff. Uncomment when done testing
img_manager.push_images(args.release) # run_setup(os.path.join(REPO_ROOT, 'setup.py'), script_args=['upload'])
# img_manager.push_images(args.release)
repository.publish_release(gh_release) repository.publish_release(gh_release)
except ScriptError as e: except ScriptError as e:
print(e) print(e)