Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def new():
"""
Create a new version for the project: updates __init__.py, CHANGELOG,
creates new commit for released version (creating a tag) and commits
to a new dev version
"""
current = Versioner.current_version()
release = Versioner.release_version()
release = click.prompt('Current version in app.yaml is {current}. Enter'
' release version'.format(current=current,
release=release),
default=release, type=str)
Versioner.update_changelog_release(release)
changelog = read_file('CHANGELOG.rst')
click.confirm('\nCHANGELOG.rst:\n\n{}\n Continue?'.format(changelog),
'done', abort=True)
# Replace version number and create tag
click.echo('Commiting release version: {}'.format(release))
def release(tag, production):
"""
Merges dev with master and pushes
"""
click.echo('Checking out tag {}'.format(tag))
call(['git', 'checkout', tag])
current = Versioner.current_version()
click.confirm('Version in {} tag is {}. Do you want to continue?'
.format(tag, current))
click.echo('Publishing to PyPI...')
where = 'pypitest' if not production else 'pypi'
call(['python', 'setup.py', 'sdist', 'upload', '-r', where])