Build delivery over HTTPS and flatten source/web.

Keep/restore https://%@ in type0x01/core and rewrite daily module URLs to https, and move campaign assets from source/web/<hash>/ up to source/web/ so templates match the channel artifact layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hashbro
2026-08-09 16:07:55 +08:00
parent 9153a4f557
commit 8b079d37e4
87 changed files with 108 additions and 86 deletions
+4 -5
View File
@@ -17,7 +17,6 @@ TOOLS = Path(__file__).resolve().parent
FRONTEND_ROOT = TOOLS.parent
LAB_ROOT = FRONTEND_ROOT
SOURCE_ROOT = FRONTEND_ROOT / "source"
ORIGINAL_CHANNEL_ID = "34f5121f572d6742703eb84ec2f866a6"
def gen_seed() -> str:
@@ -39,12 +38,12 @@ def ensure_working_tree(root: Path, channel: str) -> None:
"""Ensure channel-scoped sync/ and web/ exist."""
camp = root / "web"
sync = root / "sync"
src_camp = SOURCE_ROOT / "web" / ORIGINAL_CHANNEL_ID
src_camp = SOURCE_ROOT / "web"
src_sync = SOURCE_ROOT / "sync"
if not src_camp.is_dir() or not src_sync.is_dir():
if not src_camp.is_dir() or not (src_camp / "support.html").is_file() or not src_sync.is_dir():
raise SystemExit(
f"missing source template.\n"
f"expected: {src_camp} and {src_sync}"
f"expected: {src_camp}/support.html and {src_sync}"
)
if not camp.is_dir() or not sync.is_dir():
print("=== bootstrap working tree from source/ ===")
@@ -54,7 +53,7 @@ def ensure_working_tree(root: Path, channel: str) -> None:
if not camp.is_dir():
camp.parent.mkdir(parents=True, exist_ok=True)
shutil.copytree(src_camp, camp, symlinks=False, ignore=_ignore_junk)
print(f"copied campaign -> {camp}")
print(f"copied web/ -> {camp}")
if not camp.is_dir() or not sync.is_dir():
raise SystemExit(f"failed to bootstrap {camp} / {sync}")
print()