provision: Avoid spending time on update-authors-json.

This optimizes tools/provision by not running
`tools/update-authors-json --use-fixture` unless either the script
itself or its fixtures file (zerver/tests/fixtures/authors.json) was
changed.

Fixes #10991.
This commit is contained in:
konraddeka
2018-12-08 13:05:46 +01:00
committed by Tim Abbott
parent 63768858ff
commit e6be407e34

View File

@@ -334,7 +334,12 @@ def main(options):
print("No need to run `tools/setup/build_pygments_data`.") print("No need to run `tools/setup/build_pygments_data`.")
run(["scripts/setup/generate_secrets.py", "--development"]) run(["scripts/setup/generate_secrets.py", "--development"])
update_authors_json_paths = ["tools/update-authors-json", "zerver/tests/fixtures/authors.json"]
if file_or_package_hash_updated(update_authors_json_paths, "update_authors_json_hash", options.is_force):
run(["tools/update-authors-json", "--use-fixture"]) run(["tools/update-authors-json", "--use-fixture"])
else:
print("No need to run `tools/update-authors-json`.")
email_source_paths = ["tools/inline-email-css", "templates/zerver/emails/email.css"] email_source_paths = ["tools/inline-email-css", "templates/zerver/emails/email.css"]
email_source_paths += glob.glob('templates/zerver/emails/*.source.html') email_source_paths += glob.glob('templates/zerver/emails/*.source.html')