fabfile remove _update.zip
This commit is contained in:
Vendored
+9
-5
@@ -121,12 +121,16 @@ def deploy(appname=None, all=False):
|
||||
local('zip -r _update.zip * -x *~ -x .* -x \#* -x *.bak -x *.bak2')
|
||||
else:
|
||||
local('zip -r _update.zip */*.py views/*.html views/*/*.html static/*')
|
||||
put('_update.zip','/tmp/_update.zip')
|
||||
|
||||
with cd(appfolder):
|
||||
sudo('unzip -o /tmp/_update.zip')
|
||||
sudo('chown -R www-data:www-data *')
|
||||
sudo('echo "%s" > DATE_DEPLOYMENT' % now)
|
||||
put('_update.zip','/tmp/_update.zip')
|
||||
try:
|
||||
with cd(appfolder):
|
||||
sudo('unzip -o /tmp/_update.zip')
|
||||
sudo('chown -R www-data:www-data *')
|
||||
sudo('echo "%s" > DATE_DEPLOYMENT' % now)
|
||||
|
||||
finally:
|
||||
sudo('rm /tmp/_update.zip')
|
||||
|
||||
if backup:
|
||||
print 'TO RESTORE: fab restore:%s' % backup
|
||||
|
||||
Reference in New Issue
Block a user