(tag_name, push=False)
Tag the repo using an annotated tag.
Tag the repo using an annotated tag.
Tag the repo using an annotated tag .
def git_tag(tag_name, push=False):
    """
    Tag the repo using an annotated tag.
    """
    with chdir(get_root()):
        result = run_command(f'git tag -a {tag_name} -m "{tag_name}"', capture=True)

        if push:
            if result.code != 0:
                return result
            return run_command(f'git push origin {tag_name}', capture=True)

        return result
def git_tag ( tag_name , push = False ) : with chdir ( get_root ( ) ) : result = run_command ( f'git tag -a {tag_name} -m "{tag_name}"' , capture = True ) if push : if result . code != 0 : return result return run_command ( f'git push origin {tag_name}' , capture = True ) return result