Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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))
Versioner.commit_version(release, tag=True)
# Create a new dev version and save it
bumped_version = Versioner.bump_up_version()
click.echo('Creating new section in CHANGELOG...')
Versioner.add_changelog_dev_section(bumped_version)
click.echo('Commiting dev version: {}'.format(bumped_version))
Versioner.commit_version(bumped_version)
# Run git add and git status
click.echo('Adding new changes to the repository...')
call(['git', 'add', '--all'])
call(['git', 'status'])
# Commit repo with updated dev version
click.echo('Creating new commit with new dev version...')
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))
Versioner.commit_version(release, tag=True)
# Create a new dev version and save it
bumped_version = Versioner.bump_up_version()
click.echo('Creating new section in CHANGELOG...')
Versioner.add_changelog_dev_section(bumped_version)
click.echo('Commiting dev version: {}'.format(bumped_version))
Versioner.commit_version(bumped_version)
# Run git add and git status
click.echo('Adding new changes to the repository...')
call(['git', 'add', '--all'])
call(['git', 'status'])
# Commit repo with updated dev version
click.echo('Creating new commit with new dev version...')
msg = 'Bumps up project to version {}'.format(bumped_version)
call(['git', 'commit', '-m', msg])
call(['git', 'push'])
click.echo('Version {} was created, you are now in {}'
.format(release, bumped_version))