summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xGitAutoDeploy.py4
-rw-r--r--clear_lock.sh2
2 files changed, 6 insertions, 0 deletions
diff --git a/GitAutoDeploy.py b/GitAutoDeploy.py
index 487e9b2..f6ed8ac 100755
--- a/GitAutoDeploy.py
+++ b/GitAutoDeploy.py
@@ -35,6 +35,7 @@ class GitAutoDeploy(BaseHTTPRequestHandler):
if(not os.path.isdir(repository['path'] + '/.git')):
print "Directory %s is not a Git repository" % repository['path']
sys.exit(2)
+ self.clearLock(repository['path'])
return myClass.config
@@ -126,6 +127,9 @@ class GitAutoDeploy(BaseHTTPRequestHandler):
def unlock(self, path):
call(['sh unlock.sh "' + path + '"'], shell=True)
+ def clearLock(self, path):
+ call(['sh clear_lock.sh "' + path + '"'], shell=True)
+
def pull(self, path, branch):
if(not self.quiet):
print "\nPost push request received"
diff --git a/clear_lock.sh b/clear_lock.sh
new file mode 100644
index 0000000..601a51e
--- /dev/null
+++ b/clear_lock.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+cd $1 && rm status_waiting status_running; cd -