def fx_local(local_commit, remote):
"""Local git repository with branches, light tags, and annotated tags pushed to remote.
:param local_commit: local fixture.
:param remote: local fixture.
:return: Path to repo root.
:rtype: py.path.local
"""
run(local_commit, ['git', 'tag', 'light_tag'])
run(local_commit, ['git', 'tag', '--annotate', '-m', 'Tag annotation.', 'annotated_tag'])
run(local_commit, ['git', 'checkout', '-b', 'feature'])
run(local_commit, ['git', 'checkout', 'master'])
run(local_commit, ['git', 'remote', 'add', 'origin', remote])
run(local_commit, ['git', 'push', 'origin', 'master', 'feature', 'light_tag', 'annotated_tag'])
return local_commit
评论列表
文章目录