allow force pulls
This commit is contained in:
parent
a8808b4a27
commit
ab17f173d3
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ class handler(BaseHTTPRequestHandler):
|
|||
self.send_response(200)
|
||||
self.send_header('Content-type','text/plain')
|
||||
self.end_headers()
|
||||
if (time.time() - os.path.getmtime('./lib/deploy.sh') > 86400):
|
||||
if (time.time() - os.path.getmtime('./lib/deploy.sh') > 86400) or self.path == '/pull':
|
||||
subprocess.call(['git', 'pull'])
|
||||
with open('./lib/deploy.sh') as f:
|
||||
self.wfile.write(bytes(f.read(), 'utf-8'))
|
||||
|
|
Loading…
Reference in a new issue