Skip to content
Merged
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
10 changes: 8 additions & 2 deletions script/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ def tag_and_generate_changelog(new_version_num):


def upload_sdist(new_version_num):
call_bash_script('twine upload "dist/Appium-Python-Client-{}.tar.gz"'.format(new_version_num))
push_file = 'dist/Appium-Python-Client-{}.tar.gz'.format(new_version_num)
try:
call_bash_script('twine upload "{}"'.format(push_file))
except Exception as e:
print('Failed to upload {} to pypi. '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the error be printed to stderr?
should we rethrow the exception after print?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was enough to print messages as stdout without stop/rethrow errors.
Current usage is showing messages on CLI and should not stop this by this error.

'Please fix the original error and push it again later. Original error: {}'.format(
push_file, e))


def push_changes_to_master(new_version_num):
Expand All @@ -81,7 +87,7 @@ def ensure_publication(new_version_num):
for line in sys.stdin:
if line.rstrip().lower() == 'y':
return
exit('Canceled release pricess.')
exit('Canceled release process.')


def build_sdist():
Expand Down