mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
provision: Always build pygments_data.json if missing.
While it's a bit of extra complexity to do this check, which I'm not
excited about, we've had multiple folks spend significant time being
confused rebasing past d7d8632525 into
deleting `pygments_data.json`, with provision not rebuilding it, so
this seems worth merging as a transitional fix even if we decide to
remove it in 2 months.
This commit is contained in:
@@ -127,8 +127,9 @@ def main(options: argparse.Namespace) -> int:
|
|||||||
|
|
||||||
build_pygments_data_paths = ["tools/setup/build_pygments_data", "tools/setup/lang.json"]
|
build_pygments_data_paths = ["tools/setup/build_pygments_data", "tools/setup/lang.json"]
|
||||||
from pygments import __version__ as pygments_version
|
from pygments import __version__ as pygments_version
|
||||||
if file_or_package_hash_updated(build_pygments_data_paths, "build_pygments_data_hash", options.is_force,
|
if not os.path.exists("static/generated/pygments_data.json") or file_or_package_hash_updated(
|
||||||
[pygments_version]):
|
build_pygments_data_paths, "build_pygments_data_hash", options.is_force,
|
||||||
|
[pygments_version]):
|
||||||
run(["tools/setup/build_pygments_data"])
|
run(["tools/setup/build_pygments_data"])
|
||||||
else:
|
else:
|
||||||
print("No need to run `tools/setup/build_pygments_data`.")
|
print("No need to run `tools/setup/build_pygments_data`.")
|
||||||
|
|||||||
Reference in New Issue
Block a user