tools/setup: Delete static/generated/bots before repopulating.

tools/setup/generate_zulip_bots_static_files now starts off by
deleting static/generated/bots/ (if it hasn't been removed already)
so that outdated static files from older versions of the zulip_bots
package don't supress errors in the main repo that would otherwise
break.

For more info, see #7542

Fixes: #7542.
This commit is contained in:
Eeshan Garg 2017-11-28 21:30:19 -03:30 committed by Tim Abbott
parent ee546a33a3
commit bae1ecf1c5
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,10 @@ from zulip_bots.lib import get_bots_directory_path
bots_dir = os.path.join(settings.STATIC_ROOT, 'generated/bots')
if os.path.isdir(bots_dir):
# delete old static files, they could be outdated
shutil.rmtree(bots_dir)
os.makedirs(bots_dir, exist_ok=True)
def copyfiles(paths):