Check if there is a Git tag already in place

def release_check():
    """Check if there is a Git tag already in place"""
    tags = local("git tag", capture=True)
    tags = set(tags.splitlines())
    if env.version in tags:
        raise Exception("Already released v. %r" % env.version)