update-authors-json: Write to static, not STATIC_ROOT.

Otherwise the file isn’t processed by collectstatic and doesn’t end up
in the staticfiles.json manifest.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-07-18 14:39:36 -07:00
committed by Tim Abbott
parent 1d05a71b5d
commit 5f712b960f
2 changed files with 10 additions and 14 deletions

View File

@@ -52,6 +52,14 @@ run(['./tools/setup/build_pygments_data'], stdout=fp, stderr=fp)
# Create webpack bundle
run(['./tools/webpack'], stdout=fp, stderr=fp)
# Generate /team page markdown for authors
authors_cmd = ['./tools/update-authors-json']
if os.environ.get("TRAVIS"):
authors_cmd.append("--use-fixture")
if args.authors_not_required:
authors_cmd.append("--not-required")
run(authors_cmd, stdout=fp, stderr=fp)
# Collect the files that we're going to serve; this creates prod-static/serve.
run(['./manage.py', 'collectstatic', '--no-default-ignore',
'--noinput', '-i', 'assets', '-i', 'js', '-i', 'styles', '-i', 'templates'],
@@ -67,12 +75,4 @@ run(['./manage.py', 'compilemessages'], stdout=fp, stderr=fp)
# Needed if PRODUCTION
os.makedirs('prod-static', exist_ok=True)
# Generate /team page markdown for authors
authors_cmd = ['./tools/update-authors-json']
if os.environ.get("TRAVIS"):
authors_cmd.append("--use-fixture")
if args.authors_not_required:
authors_cmd.append("--not-required")
run(authors_cmd, stdout=fp, stderr=fp)
fp.close()