mirror of https://github.com/zulip/zulip.git
provision: Clean up `var/` for the move to `var/<uuid>/test-backend`.
This commit is contained in:
parent
b1fe1ef42b
commit
6670b15234
|
@ -7,6 +7,7 @@ import platform
|
|||
import subprocess
|
||||
import glob
|
||||
import hashlib
|
||||
import shutil
|
||||
|
||||
os.environ["PYTHONUNBUFFERED"] = "y"
|
||||
|
||||
|
@ -590,6 +591,21 @@ def main(options):
|
|||
# upstream.
|
||||
os.remove('.eslintcache')
|
||||
|
||||
# Clean up the root of the `var/` directory for various
|
||||
# testing-related files that we have migrated to
|
||||
# `var/<uuid>/test-backend`.
|
||||
print("Cleaning var/ directory files...")
|
||||
var_paths = glob.glob('var/test*')
|
||||
var_paths.append('var/bot_avatar')
|
||||
for path in var_paths:
|
||||
try:
|
||||
if os.path.isdir(path):
|
||||
shutil.rmtree(path)
|
||||
else:
|
||||
os.remove(path)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
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')
|
||||
|
|
|
@ -21,4 +21,4 @@ LATEST_RELEASE_ANNOUNCEMENT = "https://blog.zulip.org/2019/03/01/zulip-2-0-relea
|
|||
# Typically, adding a dependency only requires a minor version bump, and
|
||||
# removing a dependency requires a major version bump.
|
||||
|
||||
PROVISION_VERSION = '34.3'
|
||||
PROVISION_VERSION = '34.4'
|
||||
|
|
Loading…
Reference in New Issue