Initial public release
GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
GeoIntel release gates / Compile, test, contracts and builds (push) Successful in 1m49s
GeoIntel release gates / Python and npm vulnerability policy (push) Successful in 21s
GeoIntel release gates / Production AI image, SBOM and container scan (push) Successful in 5m39s
GeoIntel release gates / Deploy exact gated revision to Unraid (push) Failing after 58m43s
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Fail when a second GeoIntel source tree reappears below the repository root."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
CANONICAL_MARKERS = (
|
||||
"backend/app/main.py",
|
||||
"frontend/package.json",
|
||||
"docs/API_CONTRACTS.md",
|
||||
)
|
||||
|
||||
|
||||
def nested_mirror_markers(repo_root: Path) -> list[str]:
|
||||
nested = repo_root / "geointel"
|
||||
return [marker for marker in CANONICAL_MARKERS if (nested / marker).is_file()]
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument(
|
||||
"--repo-root",
|
||||
type=Path,
|
||||
default=Path(__file__).resolve().parents[1],
|
||||
)
|
||||
args = parser.parse_args()
|
||||
repo_root = args.repo_root.resolve()
|
||||
missing = [marker for marker in CANONICAL_MARKERS if not (repo_root / marker).is_file()]
|
||||
if missing:
|
||||
raise SystemExit(f"Canonical GeoIntel repository markers are missing: {missing}")
|
||||
duplicates = nested_mirror_markers(repo_root)
|
||||
if duplicates:
|
||||
raise SystemExit(
|
||||
"Nested GeoIntel repository mirror detected below geointel/: "
|
||||
f"{duplicates}. The repository root is the only canonical source tree."
|
||||
)
|
||||
print("Repository layout verified: one canonical GeoIntel source tree")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user