Finalize fixes

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2018-04-27 14:35:13 -07:00
parent 507376549c
commit 7b4603dc22
2 changed files with 5 additions and 3 deletions

View File

@ -3,7 +3,8 @@ RUN mkdir -p /src && pip install -U Jinja2==2.10 \
PyGithub==1.39 \
pypandoc==1.4 \
GitPython==2.1.9 \
requests==2.18.4 && \
requests==2.18.4 \
twine==1.11.0 && \
apt-get update && apt-get install -y pandoc
VOLUME /src/script/release

View File

@ -27,6 +27,7 @@ from release.utils import ScriptError
from release.utils import update_init_py_version
from release.utils import update_run_sh_version
from release.utils import yesno
from twine.commands.upload import main as twine_upload
def create_initial_branch(repository, args):
@ -240,8 +241,8 @@ def finalize(args):
if not merge_status.merged:
raise ScriptError('Unable to merge PR #{}: {}'.format(pr_data.number, merge_status.message))
print('Uploading to PyPi')
run_setup(os.path.join(REPO_ROOT, 'setup.py'), script_args=['upload'])
img_manager.push_images(args.release)
twine_upload(['dist/*'])
img_manager.push_images()
repository.publish_release(gh_release)
except ScriptError as e:
print(e)