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:
@@ -26,7 +26,6 @@ PROJECT_ROOT = FRONTEND_ROOT.parent
|
||||
SOURCE_ROOT = FRONTEND_ROOT / "source"
|
||||
ARTIFACTS_ROOT = PROJECT_ROOT / "artifacts"
|
||||
LAB_ROOT = FRONTEND_ROOT # cwd / out/ for tooling
|
||||
ORIGINAL_CHANNEL_ID = "34f5121f572d6742703eb84ec2f866a6"
|
||||
SUPPORT_TEMPLATES = ("test", "blank")
|
||||
DEFAULT_SUPPORT_TEMPLATE = "test"
|
||||
SUPPORT_TEMPLATE_ROOT = SOURCE_ROOT / "templates" / "support"
|
||||
@@ -72,11 +71,13 @@ def apply_support_template(campaign_dir: Path, template: str) -> None:
|
||||
|
||||
|
||||
def copy_campaign_template(dst_campaign: Path) -> None:
|
||||
src = SOURCE_ROOT / "web" / ORIGINAL_CHANNEL_ID
|
||||
src = SOURCE_ROOT / "web"
|
||||
if not src.is_dir():
|
||||
raise SystemExit(f"missing source campaign: {src}")
|
||||
raise SystemExit(f"missing source web template: {src}")
|
||||
if not (src / "support.html").is_file():
|
||||
raise SystemExit(f"missing source web/support.html under {src}")
|
||||
if dst_campaign.exists():
|
||||
raise SystemExit(f"campaign already exists: {dst_campaign}")
|
||||
raise SystemExit(f"web dest already exists: {dst_campaign}")
|
||||
shutil.copytree(src, dst_campaign, symlinks=False, ignore=_ignore_junk)
|
||||
|
||||
|
||||
@@ -220,10 +221,10 @@ def main() -> int:
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
src_campaign = SOURCE_ROOT / "web" / ORIGINAL_CHANNEL_ID
|
||||
src_campaign = SOURCE_ROOT / "web"
|
||||
src_sync = SOURCE_ROOT / "sync"
|
||||
if not src_campaign.is_dir():
|
||||
raise SystemExit(f"missing source campaign: {src_campaign}")
|
||||
if not src_campaign.is_dir() or not (src_campaign / "support.html").is_file():
|
||||
raise SystemExit(f"missing source web template (need web/support.html): {src_campaign}")
|
||||
if not src_sync.is_dir():
|
||||
raise SystemExit(f"missing source sync: {src_sync}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user