provision: Clean up var/ for the move to var/<uuid>/test-backend.

This commit is contained in:
Wyatt Hoodes
2019-06-09 15:00:04 -10:00
committed by Tim Abbott
parent b1fe1ef42b
commit 6670b15234
2 changed files with 17 additions and 1 deletions

View File

@@ -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')

View File

@@ -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'