Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
zulip_tools: Shell out to python to get true ZULIP_VERSION.
Alex Vandiver418e51cc5bec
diff --git a/scripts/lib/zulip_tools.py b/scripts/lib/zulip_tools.pyindex f4d618c2fa1..26b668a6d7c 100755--- a/scripts/lib/zulip_tools.py+++ b/scripts/lib/zulip_tools.py@@ -108,11 +108,14 @@ def get_deploy_root() -> str:def parse_version_from(deploy_path: str) -> str:- with open(os.path.join(deploy_path, "version.py")) as f:- result = re.search('ZULIP_VERSION = "(.*)"', f.read())- if result:- return result.groups()[0]- return "0.0.0"+ try:+ return subprocess.check_output(+ [sys.executable, "-c", "from version import ZULIP_VERSION; print(ZULIP_VERSION)"],+ cwd=deploy_path,+ text=True,+ ).strip()+ except subprocess.CalledProcessError:+ return "0.0.0"def get_deployment_version(extract_path: str) -> str: