示例#1
0
def release():
    """
    Release current version to pypi
    """

    with settings(warn_only=True):
        r = local(clom.git['diff-files']('--quiet', '--ignore-submodules',
                                         '--'))
        branch = str(
            local(
                "git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD`",
                capture=True)).strip()

    if branch != 'develop':
        abort('You must be on the develop branch to start a release.')
    elif r.return_code != 0:
        abort(
            'There are uncommitted changes, commit or stash them before releasing'
        )

    version = open('VERSION.txt').read().strip()

    print(green('Releasing %s...' % version))
    local(clom.git.flow.release.start(version))

    # Can't use spaces in git flow release messages, see https://github.com/nvie/gitflow/issues/98
    local(clom.git.flow.release.finish(version, m='Release-%s' % version))
    local(clom.git.push('origin', 'master', tags=True))
    local(clom.python('setup.py', 'sdist', 'upload'))
示例#2
0
def release():
    """
    Release current version to pypi
    """

    with settings(warn_only=True):
        r = local(clom.git['diff-files']('--quiet', '--ignore-submodules',
                                         '--'))

    if r.return_code != 0:
        abort(
            'There are uncommitted changes, commit or stash them before releasing'
        )

    version = open('VERSION.txt').read().strip()

    existing_tag = local(clom.git.tag('-l', version), capture=True)
    if not existing_tag.strip():
        print('Releasing %s...' % version)
        local(clom.git.tag(version))

    if confirm('Push %s to pypi?' % version, default=True):
        local(clom.git.push('origin', 'HEAD'))
        local(clom.git.push('origin', version))
        local(clom.python('setup.py', 'sdist', 'upload'))
示例#3
0
def release():
    """
    Release current version to pypi
    """

    with settings(warn_only=True):
        r = local(clom.git['diff-files']('--quiet', '--ignore-submodules',
                                         '--'))

    if r.return_code != 0:
        abort(
            'There are uncommitted changes, commit or stash them before releasing'
        )

    version = open('VERSION.txt').read().strip()

    existing_tag = local(clom.git.tag('-l', version), capture=True)
    if not existing_tag.strip():
        print('Releasing %s...' % version)
        local(clom.git.flow.release.start(version))
        local(clom.git.flow.release.finish(version, m='Release-%s' % version))

    if confirm('Push %s to pypi?' % version, default=True):
        local(clom.git.push('origin', 'HEAD'))
        local(clom.git.push('origin', version))
        local(clom.python('setup.py', 'sdist', 'upload'))
示例#4
0
def release(version=None):
    """
    Release with git flow then release current version to pypi
    """
    with settings(warn_only=True):
        r = local(clom.git['diff-files']('--quiet', '--ignore-submodules', '--'))
        branch = str(local("git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD`", capture=True)).strip()

    if branch != 'develop':
        abort('You must be on the develop branch to start a release.')
    elif r.return_code != 0:
        abort('There are uncommitted changes, commit or stash them before releasing')

    if confirm('Must pull from origin to continue, pull now?'):     
        local(clom.git.pull('origin', 'develop'))
    else:
        abort('Aborted by user.')

    if not version:
        version = open('VERSION.txt').read().strip()
        if not confirm('Do you want to release as version `{version}`?'.format(version=version), default=False):
            abort('Aborted by user.')

    puts(green('Releasing %s...' % version))
    local(clom.git.flow.release.start(version))

    # Can't use spaces in git flow release messages, see https://github.com/nvie/gitflow/issues/98
    local(clom.git.flow.release.finish(version, m='Release-%s' % version))
    local(clom.git.push('origin', 'master', 'develop', tags=True))
    local(clom.python('setup.py', 'sdist', 'upload'))
示例#5
0
def release():
    """
    Release current version to pypi
    """

    with settings(warn_only=True):
        r = local(clom.git['diff-files']('--quiet', '--ignore-submodules', '--'))

    if r.return_code != 0:
        abort('There are uncommitted changes, commit or stash them before releasing')

    version = open('VERSION.txt').read().strip()

    print('Releasing %s...' % version)
    local(clom.git.tag(version, a=True, m='Release %s' % version))
    local(clom.git.push('origin', 'HEAD'))
    local(clom.git.push('origin', version))
    local(clom.python('setup.py', 'sdist', 'upload'))
示例#6
0
def release():
    """
    Release current version to pypi
    """

    with settings(warn_only=True):
        r = local(clom.git["diff-files"]("--quiet", "--ignore-submodules", "--"))

    if r.return_code != 0:
        abort("There are uncommitted changes, commit or stash them before releasing")

    version = open("VERSION.txt").read().strip()

    print("Releasing %s..." % version)
    local(clom.git.flow.release.start(version))
    local(clom.git.flow.release.finish(version, m="Release-%s" % version))
    local(clom.git.push("origin", "master", "develop", tags=True))
    local(clom.python("setup.py", "sdist", "upload"))
示例#7
0
def release():
    """
    Release current version to pypi
    """

    with settings(warn_only=True):
        r = local(clom.git['diff-files']('--quiet', '--ignore-submodules',
                                         '--'))

    if r.return_code != 0:
        abort(
            'There are uncommitted changes, commit or stash them before releasing'
        )

    version = open('VERSION.txt').read().strip()

    print('Releasing %s...' % version)
    local(clom.git.flow.release.start(version))
    local(clom.git.flow.release.finish(version, m='Release-%s' % version))
    local(clom.git.push('origin', 'master', 'develop', tags=True))
    local(clom.python('setup.py', 'sdist', 'upload'))
示例#8
0
def release():
    """
    Release current version to pypi
    """

    with settings(warn_only=True):
        r = local(clom.git['diff-files']('--quiet', '--ignore-submodules', '--'))
        branch = str(local("git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD`", capture=True)).strip()

    if branch != 'develop':
        abort('You must be on the develop branch to start a release.')
    elif r.return_code != 0:
        abort('There are uncommitted changes, commit or stash them before releasing')

    version = open('VERSION.txt').read().strip()

    print(green('Releasing %s...' % version))
    local(clom.git.flow.release.start(version))

    # Can't use spaces in git flow release messages, see https://github.com/nvie/gitflow/issues/98
    local(clom.git.flow.release.finish(version, m='Release-%s' % version))
    local(clom.git.push('origin', 'master', tags=True))
    local(clom.python('setup.py', 'sdist', 'upload'))
示例#9
0
def release():
    """
    Release current version to pypi
    """

    with settings(warn_only=True):
        r = local(clom.git["diff-files"]("--quiet", "--ignore-submodules", "--"))

    if r.return_code != 0:
        abort("There are uncommitted changes, commit or stash them before releasing")

    version = open("VERSION.txt").read().strip()

    existing_tag = local(clom.git.tag("-l", version), capture=True)
    if not existing_tag.strip():
        print("Releasing %s..." % version)
        local(clom.git.flow.release.start(version))
        local(clom.git.flow.release.finish(version, m="Release-%s" % version))

    if confirm("Push %s to pypi?" % version, default=True):
        local(clom.git.push("origin", "HEAD"))
        local(clom.git.push("origin", version))
        local(clom.python("setup.py", "sdist", "upload"))
示例#10
0
def release():
    """
    Release current version to pypi
    """    

    with settings(warn_only=True):
        r = local(clom.git['diff-files']('--quiet', '--ignore-submodules', '--'))

    if r.return_code != 0:
        abort('There are uncommitted changes, commit or stash them before releasing')

    version = open('VERSION.txt').read().strip()

    puts(green('Releasing %s...' % version))
    local(clom.git.flow.release.start(version))

    # Can't use spaces in git flow release messages, see https://github.com/nvie/gitflow/issues/98
    local(clom.git.flow.release.finish(version, m='Release-%s' % version))

    if prompt('Push to origin?'):
        local(clom.git.push('origin', 'master', 'develop').with_opts(tags=True))        

        if prompt('Push to pypi?'):
            local(clom.python('setup.py', 'sdist', 'upload'))
示例#11
0
def register():
    """
    Register current version to pypi
    """
    local(clom.python('setup.py', 'register'))
示例#12
0
def register():
    """
    Register current version to pypi
    """
    local(clom.python('setup.py', 'register'))    
示例#13
0
def register():
    """
    Register current version to pypi
    """
    local(clom.python("setup.py", "register"))