Fabric에서 내부 변수로 git branch 이름을 받아오는 것은 아래와 같이 합니다.
git_branch = local('git rev-parse --abbrev-ref HEAD', capture=True)
local 함수가 기본적으로 capture=False로 작동하는데 True로 변경하면 값을 가져올 수 있습니다.
http://docs.fabfile.org/en/1.13/api/core/operations.html
'파이썬(python2.7) > 라이브러리,SW' 카테고리의 다른 글
python RoboBrowser login submit (0) | 2017.06.08 |
---|---|
Html parsing - beautifulsoup4 (find all elements using attribute) (0) | 2017.06.07 |
pip Installed Package List -> Text File (2) | 2017.03.04 |
Fabric - get branch name (0) | 2017.02.28 |
Html parsing - beautifulsoup4 (child element) (0) | 2016.08.21 |
Html parsing - beautifulsoup4 (find_all image src) (1) | 2016.08.21 |
Html parsing - beautifulsoup4 (install) (0) | 2016.08.20 |
MariaDB console 에서 ctrl + c 누르면 (0) | 2015.09.11 |