mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 02:56:17 -10:00
playhorizon.dev now deploys from the private ludovic111/horizon-site, which holds website/'s history. The files its build still reads from here move out of website/: - the design tokens to crates/horizon-theme/tokens.css (xtask tokens writes them, tokens_css_is_up_to_date checks them); - the roadmap's JSON to roadmap/roadmap.json (tools/roadmap.py build); - the benchmark fixtures to crates/horizon-telemetry-server/tests/fixtures/benchmarks/ (the site keeps a copy); - the web icons to docs/media/brand/web/ (xtask icons). pr_ready loses its website area and the tokens special case; rust_changes, the roadmap's links and every doc that pointed into website/ follow. Co-Authored-By: Claude Opus 5.5 <[email protected]>
26 lines
832 B
Python
26 lines
832 B
Python
#!/usr/bin/env python3
|
|
"""Keep verify's Rust steps for any change beyond documentation."""
|
|
|
|
import argparse
|
|
import subprocess
|
|
|
|
|
|
def needs_rust(paths):
|
|
return any(not (path.startswith("docs/") or path.endswith(".md")) for path in paths)
|
|
|
|
|
|
def changed_paths(base, head):
|
|
# Renames must include deletions too: moving source into docs still affects Rust.
|
|
output = subprocess.check_output([
|
|
"git", "diff", "--name-only", "--no-renames", "-z", f"{base}...{head}", "--",
|
|
])
|
|
return [path for path in output.decode("utf-8").split("\0") if path]
|
|
|
|
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
parser.add_argument("base")
|
|
parser.add_argument("head")
|
|
args = parser.parse_args()
|
|
print(f"required={str(needs_rust(changed_paths(args.base, args.head))).lower()}")
|