How to use the versioneer.Versioner.current_version function in versioneer

To help you get started, we’ve selected a few versioneer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github edublancas / sklearn-evaluation / versioneer.py View on Github external
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))
github edublancas / sklearn-evaluation / versioneer.py View on Github external
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])