summaryrefslogtreecommitdiffstats
path: root/GitAutoDeploy.py
diff options
context:
space:
mode:
authorJulien Bisconti <julien.bisconti@gmail.com>2015-12-03 14:46:01 +0100
committerJulien Bisconti <julien.bisconti@gmail.com>2015-12-03 14:46:01 +0100
commit06f02629c624287cdfa19216283cafb25ff0fb2b (patch)
treef9e2cf0d16f8939c887f0a1a5baec08545eb9a49 /GitAutoDeploy.py
parent4d329f654dbd23fe95931f11b1cbb15d56fc6c1a (diff)
downloadGit-Auto-Deploy-06f02629c624287cdfa19216283cafb25ff0fb2b.zip
Git-Auto-Deploy-06f02629c624287cdfa19216283cafb25ff0fb2b.tar.gz
Git-Auto-Deploy-06f02629c624287cdfa19216283cafb25ff0fb2b.tar.bz2
add option: remote
Diffstat (limited to 'GitAutoDeploy.py')
-rwxr-xr-xGitAutoDeploy.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py
index 2060df6..4f18c95 100755
--- a/GitAutoDeploy.py
+++ b/GitAutoDeploy.py
@@ -60,14 +60,15 @@ class GitWrapper():
from subprocess import call
branch = ('branch' in repo_config) and repo_config['branch'] or 'master'
+ remote = ('remote' in repo_config) and repo_config['remote'] or 'origin'
print "Post push request received"
print 'Updating ' + repo_config['path']
cmd = 'cd "' + repo_config['path'] + '"' \
'&& unset GIT_DIR ' + \
- '&& git fetch origin ' + \
- '&& git reset --hard origin/' + branch + ' ' + \
+ '&& git fetch ' + remote + \
+ '&& git reset --hard ' + remote + '/' + branch + ' ' + \
'&& git submodule init ' + \
'&& git submodule update'