Python Fabricは問題なく動作していますが、問題が 1 つあります。実行する$ fab deploy
と、常にマージポップアップが表示されます
Please enter a commit message to explain why this merge is necessary,
especially if it merges an updated upstream into a topic branch.
なぜそれがいつもこれをするのか理解できません。SSH でまったく同じコマンドを実行して git リポジトリをプルすると、マージの問題なしで機能します。
私は Windows 8 を使用していて、それが重要な場合は Linux に引っ張っていると言います。行末は問題になるべきではありません。
これはfabfile.pyです
from fabric.api import *
from fabric.colors import *
env.user = 'username'
env.host_string = '99.99.0.99'
def deploy(branch = 'master'):
path = '/var/www/mysite/htdocs'
with cd(path):
run("git pull origin {0}".format(branch))
def commit(branch = 'master'):
local('git add -u')
local('git add .')
message = prompt("commit msg: ")
local('git commit -m "{0}"'.format(message))
local('git push origin {0}'.format(branch))