mirror of
https://github.com/zulip/zulip.git
synced 2025-11-19 14:08:23 +00:00
zulip_tools.py: Add a make_deploy_path function and make it invokable from the commandline
(imported from commit 94578d117864fba76f9353784734c712c89c4bf2)
This commit is contained in:
@@ -6,7 +6,7 @@ import datetime
|
||||
import tempfile
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
from zulip_tools import DEPLOYMENTS_DIR, TIMESTAMP_FORMAT, FAIL, ENDC
|
||||
from zulip_tools import DEPLOYMENTS_DIR, FAIL, ENDC, make_deploy_path
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print FAIL + "Usage: %s <tarball>" % (sys.argv[0],) + ENDC
|
||||
@@ -14,8 +14,7 @@ if len(sys.argv) != 2:
|
||||
|
||||
tarball_path = sys.argv[1]
|
||||
|
||||
timestamp = datetime.datetime.now().strftime(TIMESTAMP_FORMAT)
|
||||
deploy_path = os.path.join(DEPLOYMENTS_DIR, timestamp)
|
||||
deploy_path = make_deploy_path()
|
||||
|
||||
extract_path = tempfile.mkdtemp()
|
||||
subprocess.check_call(["tar", "-xf", tarball_path, "-C", extract_path])
|
||||
|
||||
Reference in New Issue
Block a user