mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
provision: Clean up var/ for the move to var/<uuid>/test-backend.
This commit is contained in:
@@ -7,6 +7,7 @@ import platform
|
|||||||
import subprocess
|
import subprocess
|
||||||
import glob
|
import glob
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import shutil
|
||||||
|
|
||||||
os.environ["PYTHONUNBUFFERED"] = "y"
|
os.environ["PYTHONUNBUFFERED"] = "y"
|
||||||
|
|
||||||
@@ -590,6 +591,21 @@ def main(options):
|
|||||||
# upstream.
|
# upstream.
|
||||||
os.remove('.eslintcache')
|
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')
|
version_file = os.path.join(UUID_VAR_PATH, 'provision_version')
|
||||||
print('writing to %s\n' % (version_file,))
|
print('writing to %s\n' % (version_file,))
|
||||||
open(version_file, 'w').write(PROVISION_VERSION + '\n')
|
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
|
# Typically, adding a dependency only requires a minor version bump, and
|
||||||
# removing a dependency requires a major version bump.
|
# removing a dependency requires a major version bump.
|
||||||
|
|
||||||
PROVISION_VERSION = '34.3'
|
PROVISION_VERSION = '34.4'
|
||||||
|
|||||||
Reference in New Issue
Block a user