mirror of https://github.com/zulip/zulip.git
zulip_tools.py: Move zulip_tools.py in scripts/lib.
This commit moves zulip_tools.py as part of cleaning the root directory and organizing proejct into better directory structure.
This commit is contained in:
parent
c9b05a2a84
commit
d606b95242
|
@ -609,7 +609,7 @@ that looks something like:
|
|||
==> default: File "/srv/zulip/tools/provision.py", line 191, in main
|
||||
==> default:
|
||||
==> default: run(["npm", "install"])
|
||||
==> default: File "/srv/zulip/zulip_tools.py", line 78, in run
|
||||
==> default: File "/srv/zulip/scripts/lib/zulip_tools.py", line 78, in run
|
||||
==> default:
|
||||
==> default: raise subprocess.CalledProcessError(rc, args)
|
||||
==> default: subprocess
|
||||
|
|
|
@ -24,7 +24,7 @@ except (configparser.NoSectionError, configparser.NoOptionError):
|
|||
os.environ["PYTHONUNBUFFERED"] = "y"
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
from zulip_tools import DEPLOYMENTS_DIR, FAIL, WARNING, ENDC, make_deploy_path, \
|
||||
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, FAIL, WARNING, ENDC, make_deploy_path, \
|
||||
get_deployment_lock, release_deployment_lock, su_to_zulip
|
||||
|
||||
logging.basicConfig(format="%(asctime)s update-deployment: %(message)s",
|
||||
|
|
|
@ -9,7 +9,7 @@ ZULIP_PATH = dirname(dirname(dirname(abspath(__file__))))
|
|||
if ZULIP_PATH not in sys.path:
|
||||
sys.path.append(ZULIP_PATH)
|
||||
|
||||
from zulip_tools import run
|
||||
from scripts.lib.zulip_tools import run
|
||||
from scripts.lib.setup_venv import setup_virtualenv, VENV_DEPENDENCIES
|
||||
|
||||
parser = argparse.ArgumentParser(description="Create a production virtualenv with caching")
|
||||
|
|
|
@ -95,7 +95,7 @@ if [ "$has_postgres" = 0 ]; then
|
|||
fi
|
||||
|
||||
if [ "$has_appserver" = 0 ]; then
|
||||
deploy_path=$(/root/zulip/zulip_tools.py make_deploy_path)
|
||||
deploy_path=$(/root/zulip/scripts/lib/zulip_tools.py make_deploy_path)
|
||||
mv /root/zulip "$deploy_path"
|
||||
ln -nsf /home/zulip/deployments/next /root/zulip
|
||||
ln -nsf "$deploy_path" /home/zulip/deployments/next
|
||||
|
|
|
@ -4,7 +4,7 @@ import os
|
|||
import sys
|
||||
from os.path import dirname, abspath
|
||||
import subprocess
|
||||
from zulip_tools import run
|
||||
from scripts.lib.zulip_tools import run
|
||||
|
||||
ZULIP_PATH = dirname(dirname(dirname(abspath(__file__))))
|
||||
VENV_CACHE_PATH = "/srv/zulip-venv-cache"
|
||||
|
|
|
@ -10,7 +10,7 @@ import glob
|
|||
os.environ["PYTHONUNBUFFERED"] = "y"
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..', ".."))
|
||||
from zulip_tools import DEPLOYMENTS_DIR, FAIL, ENDC, make_deploy_path
|
||||
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, FAIL, ENDC, make_deploy_path
|
||||
|
||||
if len(sys.argv) != 2:
|
||||
print(FAIL + "Usage: %s <tarball>" % (sys.argv[0],) + ENDC)
|
||||
|
|
|
@ -10,7 +10,7 @@ TARBALL_ARCHIVE_PATH="/home/zulip/archives"
|
|||
os.environ["PYTHONUNBUFFERED"] = "y"
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||
from zulip_tools import DEPLOYMENTS_DIR, FAIL, WARNING, ENDC, \
|
||||
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, FAIL, WARNING, ENDC, \
|
||||
mkdir_p, su_to_zulip, get_deployment_lock, release_deployment_lock
|
||||
|
||||
logging.basicConfig(format="%(asctime)s upgrade-zulip: %(message)s",
|
||||
|
|
|
@ -14,7 +14,7 @@ import logging
|
|||
os.environ["PYTHONUNBUFFERED"] = "y"
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||
from zulip_tools import DEPLOYMENTS_DIR, FAIL, WARNING, ENDC, su_to_zulip
|
||||
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, FAIL, WARNING, ENDC, su_to_zulip
|
||||
|
||||
logging.basicConfig(format="%(asctime)s upgrade-zulip-stage-2: %(message)s",
|
||||
level=logging.INFO)
|
||||
|
|
|
@ -6,7 +6,7 @@ import datetime
|
|||
import shutil
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
from zulip_tools import DEPLOYMENTS_DIR, TIMESTAMP_FORMAT
|
||||
from scripts.lib.zulip_tools import DEPLOYMENTS_DIR, TIMESTAMP_FORMAT
|
||||
|
||||
logging.basicConfig(format="%(asctime)s purge-deployments: %(message)s",
|
||||
level=logging.INFO)
|
||||
|
|
|
@ -8,7 +8,7 @@ import logging
|
|||
import time
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
from zulip_tools import ENDC, OKGREEN, DEPLOYMENTS_DIR
|
||||
from scripts.lib.zulip_tools import ENDC, OKGREEN, DEPLOYMENTS_DIR
|
||||
|
||||
logging.basicConfig(format="%(asctime)s restart-server: %(message)s",
|
||||
level=logging.INFO)
|
||||
|
|
|
@ -34,7 +34,7 @@ import sys
|
|||
import subprocess
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
from zerver.lib.str_utils import force_str, force_bytes
|
||||
from zulip_tools import ENDC, FAIL, subprocess_text_output
|
||||
from scripts.lib.zulip_tools import ENDC, FAIL, subprocess_text_output
|
||||
|
||||
def update_deployment(server, refname):
|
||||
return subprocess.call(["ssh", "-l", "zulip", server, "--", "env", "-u", "GIT_DIR",
|
||||
|
|
|
@ -13,7 +13,7 @@ PY2 = sys.version_info[0] == 2
|
|||
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
sys.path.append(ZULIP_PATH)
|
||||
from zulip_tools import run, subprocess_text_output, OKBLUE, ENDC, WARNING
|
||||
from scripts.lib.zulip_tools import run, subprocess_text_output, OKBLUE, ENDC, WARNING
|
||||
from scripts.lib.setup_venv import setup_virtualenv, VENV_DEPENDENCIES
|
||||
|
||||
SUPPORTED_PLATFORMS = {
|
||||
|
|
|
@ -6,7 +6,7 @@ import platform
|
|||
import subprocess
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
|
||||
from zulip_tools import run
|
||||
from scripts.lib.zulip_tools import run
|
||||
|
||||
if platform.architecture()[0] == '64bit':
|
||||
phantomjs_arch = 'x86_64'
|
||||
|
|
Loading…
Reference in New Issue