@_cloneDir(gitUrl='git@github.com:ooici/pyon.git',
    project='pyon',
    default_branch='master')
def release(branch):

    # Deduce release version
    nextVersionD = _getReleaseVersion()
  
    # Update setup.py to release version 
    version_re = re.compile("(?P<indent>\s*)version = '(?P<version>[^\s]+)'")
    _replaceVersionInFile('setup.py', version_re,
            versionTemplates['release'], lambda old: nextVersionD)
    # Tag at release version
    remote = _gitTag(nextVersionD, branch=branch)
   
    # Immediately go to next dev version to ensure release version is tied
    # to one commit only
    nextVersionD['micro'] += 1
    _replaceVersionInFile('setup.py', version_re,
            versionTemplates['dev'], lambda old: nextVersionD)

    devMsg = versionTemplates['dev-message'] % nextVersionD
    local(devMsg % 'git commit -am "%s"')

    # Push commits and tags
    local('git push %s --tags' % (remote))
    local('git push %s %s' % (remote, branch))
dataset/ETHPy150Open ooici/pyon/fabfile.py/release/swapped operands of `%`