Release v2.14.0: Resolve tracked deploy/push-all-to-git-libre-audio.sh fallback in deploy_scripts_sync.py when parent push script is absent on VPS
This commit is contained in:
1 parent
f78cf47e00
commit
bfcf295886
4 files changed
+31
-5
No files matched your search
@@ -57,6 +57,8 @@ def prepare_and_verify_deploy_scripts(
|
||||
errors: list[str] = []
|
||||
|
||||
# Gate D1: Version Header & Tracked Mirror Parity
|
||||
# Note: On VPS (/srv/hyperstitionstud.io/repos), the tracked copy is `hyperstitionstudio-core/deploy/push-all-to-git-libre-audio.sh`
|
||||
# while the parent directory `ws_root/push-all-to-git-libre-audio.sh` may be absent until hydrated.
|
||||
if ws_push_sh.is_file():
|
||||
push_txt = ws_push_sh.read_text(encoding="utf-8")
|
||||
upd_push = re.sub(r"^#\s*Release\s+v\d+\.\d+\.\d+:", f"# Release v{ver}:", push_txt, count=1, flags=re.M)
|
||||
@@ -69,7 +71,6 @@ def prepare_and_verify_deploy_scripts(
|
||||
modified_files.append(_norm_ws_path(ws_push_sh, workspace_root=ws_root))
|
||||
push_txt = upd_push
|
||||
|
||||
# Ensure tracked mirror inside hyperstitionstudio-core/deploy/push-all-to-git-libre-audio.sh is byte-identical
|
||||
tracked_txt = tracked_push_sh.read_text(encoding="utf-8") if tracked_push_sh.is_file() else ""
|
||||
if tracked_txt != push_txt:
|
||||
if check_only:
|
||||
@@ -79,8 +80,25 @@ def prepare_and_verify_deploy_scripts(
|
||||
tracked_push_sh.write_text(push_txt, encoding="utf-8")
|
||||
tracked_push_sh.chmod(0o755)
|
||||
modified_files.append(_norm_ws_path(tracked_push_sh, workspace_root=ws_root))
|
||||
elif tracked_push_sh.is_file():
|
||||
push_txt = tracked_push_sh.read_text(encoding="utf-8")
|
||||
upd_push = re.sub(r"^#\s*Release\s+v\d+\.\d+\.\d+:", f"# Release v{ver}:", push_txt, count=1, flags=re.M)
|
||||
if upd_push != push_txt:
|
||||
if check_only:
|
||||
errors.append(f"Gate D1: {tracked_push_sh} release header does not match v{ver}")
|
||||
else:
|
||||
tracked_push_sh.write_text(upd_push, encoding="utf-8")
|
||||
tracked_push_sh.chmod(0o755)
|
||||
modified_files.append(_norm_ws_path(tracked_push_sh, workspace_root=ws_root))
|
||||
push_txt = upd_push
|
||||
if not check_only:
|
||||
try:
|
||||
ws_push_sh.write_text(push_txt, encoding="utf-8")
|
||||
ws_push_sh.chmod(0o755)
|
||||
except OSError:
|
||||
pass
|
||||
else:
|
||||
errors.append(f"Gate D1: Missing {ws_push_sh}")
|
||||
errors.append(f"Gate D1: Missing both {ws_push_sh} and {tracked_push_sh}")
|
||||
|
||||
if sync_vps_sh.is_file():
|
||||
sync_txt = sync_vps_sh.read_text(encoding="utf-8")
|
||||
@@ -155,7 +173,8 @@ def prepare_and_verify_deploy_scripts(
|
||||
|
||||
# Gate D6: Single-Layer 1x Compression & Caddyfile Media Extension Parity
|
||||
caddy_txt = caddyfile_p.read_text(encoding="utf-8") if caddyfile_p.is_file() else ""
|
||||
push_txt_cur = ws_push_sh.read_text(encoding="utf-8") if ws_push_sh.is_file() else ""
|
||||
push_src = ws_push_sh if ws_push_sh.is_file() else tracked_push_sh
|
||||
push_txt_cur = push_src.read_text(encoding="utf-8") if push_src.is_file() else ""
|
||||
gate_d6_ok = (
|
||||
"--enforce-single-compression" in push_txt_cur
|
||||
and "--enforce-single-compression" in sync_txt_cur
|
||||
|
||||
@@ -425,6 +425,12 @@ def get_version_targets(ws_root: Path | None = None) -> list[tuple[Path, list[tu
|
||||
(rf'encyclopedia-knowledge-graph \(v{SEMVER_RE}\)', "encyclopedia-knowledge-graph (v{V})"),
|
||||
],
|
||||
),
|
||||
(
|
||||
core / "deploy" / "push-all-to-git-libre-audio.sh",
|
||||
[
|
||||
(rf'# Release v{SEMVER_RE}:', "# Release v{V}:"),
|
||||
],
|
||||
),
|
||||
(
|
||||
core.parent / "push-all-to-git-libre-audio.sh",
|
||||
[
|
||||
|
||||
Reference in new issue
Block a user