fabfile.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:ansible-role 作者: mattvonrocketstein 项目源码 文件源码
def git_branch():
    """ returns (branch-name, hash) """
    with api.quiet():
        cmd = 'git rev-parse --abbrev-ref HEAD'
        current_branch = api.local(cmd, capture=True)
        cmd = 'git rev-parse HEAD'
        current_hash = api.local(cmd, capture=True)
    return current_hash, current_branch
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号