cd失败的git hooks

时间:2017-07-05 15:11:46

标签: git github githooks

当我尝试将CD放入特定文件夹时,它在“未设置完成”后卡住了。不知道为什么.tried unsetting GIT_DIR,env -i。但没有希望!

branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
command="ansible-playbook -i hosts tasks/git_pull.yml --extra-vars='host=" 
command=$command$branch"'"
echo $command >> gitpush2.txt
unset $(git rev-parse --local-env-vars)
echo "enter /home/hari/code/ansible/git/" >> gitpush2.txt 
echo "unset" >> gitpush2.txt
unset GIT_DIR
echo "unset done" >> gitpush2.txt
cd /home/hari/code/ansible/git/ 
echo "got in" >> gitpush2.txt
unset GIT_DIR
echo "execute" >> gitpush2.txt
env -i eval $command >> gitpush3.txt
echo "done " >> gitpush2.txt

0 个答案:

没有答案