scripts/dossiers-ngi/README.md: update branch-status-hourly.py reference
This commit is contained in:
parent
8a09314eaf
commit
e35205b6cd
3 changed files with 15 additions and 5 deletions
|
|
@ -21,9 +21,14 @@ from datetime import datetime, timezone
|
|||
from pathlib import Path
|
||||
|
||||
ADMIN_LOG = Path(__file__).resolve().parents[2]
|
||||
OUT = ADMIN_LOG / "sites" / "dossiers.ngi.hacktivism.ch" / "branch-status.json"
|
||||
_DEFAULT_OUT = ADMIN_LOG / "sites" / "dossiers.ngi.hacktivism.ch" / "branch-status.json"
|
||||
HOST = "https://dossiers.ngi.hacktivism.ch"
|
||||
|
||||
|
||||
def out_path() -> Path:
|
||||
raw = os.environ.get("OUT", "").strip()
|
||||
return Path(raw).expanduser() if raw else _DEFAULT_OUT
|
||||
|
||||
# Default local clone; override with TDPD_ROOT (koopa may use a different path).
|
||||
DEFAULT_TDPD = Path.home() / "git" / "src" / "ngi" / "tech-dossier-project-data"
|
||||
|
||||
|
|
@ -76,9 +81,10 @@ def main() -> int:
|
|||
for b in branches
|
||||
],
|
||||
}
|
||||
OUT.parent.mkdir(parents=True, exist_ok=True)
|
||||
OUT.write_text(json.dumps(payload, indent=2) + "\n", encoding="utf-8")
|
||||
print(f"wrote {OUT}", file=sys.stderr)
|
||||
dest = out_path()
|
||||
dest.parent.mkdir(parents=True, exist_ok=True)
|
||||
dest.write_text(json.dumps(payload, indent=2) + "\n", encoding="utf-8")
|
||||
print(f"wrote {dest}", file=sys.stderr)
|
||||
return 0
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue