mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
upgrade-zulip: Archive release tarballs at /home/zulip/archives.
A common issue when doing a Zulip upgrade is trying to pass upgrade-zulip a tarball path under /root, which doesn't work because the Zulip user doesn't have permission to read the tarball. We could fix this by just unpacking the tarballs as root, but it seemed like a nicer approach would be to archive the release tarballs somewhere readable by the Zulip user (/home/zulip/archives) and unpack them from there. Fixes #208.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python2.7
|
||||
from __future__ import print_function
|
||||
import errno
|
||||
import os
|
||||
import sys
|
||||
import datetime
|
||||
@@ -29,3 +30,13 @@ if __name__ == '__main__':
|
||||
cmd = sys.argv[1]
|
||||
if cmd == 'make_deploy_path':
|
||||
print(make_deploy_path())
|
||||
|
||||
def mkdir_p(path):
|
||||
# Python doesn't have an analog to `mkdir -p` < Python 3.2.
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except OSError, e:
|
||||
if e.errno == errno.EEXIST and os.path.isdir(path):
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user