我正在尝试设置一个 fabfile 来部署我的 Django 应用程序。
我不知道为什么会收到此错误:
致命错误:local() 在执行 'git commit -m 'changed settings for prodserver' 时遇到错误(返回代码 2)
$ fab create_branch_deploy_to_prodserver
[localhost] run: git checkout prodserver_server
[localhost] run: git merge master
[localhost] run: cp settings_prodserver.py settings.py
[localhost] run: git add settings.py
[localhost] run: git commit -m 'changed settings for prodserver'
Fatal error: local() encountered an error (return code 1) while executing 'git commit -m 'changed settings for prodserver''
Aborting.
这里如果织物功能:
def create_branch_deploy_to_prodserver():
local("git checkout prodserver_server")
local("git merge master")
local('cp settings_prodserver.py settings.py') #
#local('git rm fabfile.py') #This is also creating error so it's commented out
local('git add settings.py')
local("git commit -m 'changed settings for prodserver'")
是否可以从 Fabric 进行 git 提交?