mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
provision_version: Move to under UUID_VAR_PATH.
This commit is contained in:
@@ -11,6 +11,8 @@ if False:
|
||||
TOOLS_DIR = os.path.dirname(__file__)
|
||||
ROOT_DIR = os.path.dirname(TOOLS_DIR)
|
||||
sys.path.insert(0, ROOT_DIR)
|
||||
from scripts.lib.zulip_tools import get_dev_uuid_var_path
|
||||
UUID_VAR_PATH = get_dev_uuid_var_path()
|
||||
|
||||
def run(check_func):
|
||||
# type: (Callable) -> None
|
||||
@@ -70,7 +72,7 @@ def check_django():
|
||||
@run
|
||||
def provision_version():
|
||||
# type: () -> bool
|
||||
fn = os.path.join(ROOT_DIR, 'var/provision_version')
|
||||
fn = os.path.join(UUID_VAR_PATH, 'provision_version')
|
||||
with open(fn) as f:
|
||||
version = f.read().strip()
|
||||
print('latest version provisioned:', version)
|
||||
|
||||
@@ -369,7 +369,7 @@ def main(options):
|
||||
else:
|
||||
print("No need to run `manage.py compilemessages`.")
|
||||
|
||||
version_file = os.path.join(ZULIP_PATH, 'var/provision_version')
|
||||
version_file = os.path.join(UUID_VAR_PATH, 'provision_version')
|
||||
print('writing to %s\n' % (version_file,))
|
||||
open(version_file, 'w').write(PROVISION_VERSION + '\n')
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ from typing import Optional, Tuple
|
||||
import os
|
||||
from distutils.version import LooseVersion
|
||||
from version import PROVISION_VERSION
|
||||
from scripts.lib.zulip_tools import get_dev_uuid_var_path
|
||||
|
||||
def get_major_version(v):
|
||||
# type: (str) -> int
|
||||
@@ -10,7 +11,8 @@ def get_major_version(v):
|
||||
|
||||
def get_version_file():
|
||||
# type: () -> str
|
||||
return 'var/provision_version'
|
||||
uuid_var_path = get_dev_uuid_var_path()
|
||||
return os.path.join(uuid_var_path, 'provision_version')
|
||||
|
||||
PREAMBLE = '''
|
||||
Before we run tests, we make sure your provisioning version
|
||||
|
||||
Reference in New Issue
Block a user