48 lines
1.4 KiB
Python
48 lines
1.4 KiB
Python
#!/usr/bin/env python3
|
|
"""No-op delete for shared /weifile + /details layout.
|
|
|
|
New-builder assets are deployment-wide. Removing one DB channel must not wipe
|
|
shared weifile/details used by the active campaign.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import argparse
|
|
import json
|
|
from pathlib import Path
|
|
|
|
import build as xxbb_build
|
|
|
|
RESULT_MARKER = "CORUNA_BUILD_RESULT "
|
|
|
|
|
|
def main() -> int:
|
|
parser = argparse.ArgumentParser(
|
|
description="Shared weifile/details are not deleted per channel (noop)."
|
|
)
|
|
parser.add_argument("--channel-name", default="", help="ignored (legacy)")
|
|
parser.add_argument(
|
|
"--artifact-root",
|
|
type=Path,
|
|
default=xxbb_build.PROJECT_ROOT / "public",
|
|
help="shared artifact root (default: coruna-lab/public)",
|
|
)
|
|
args = parser.parse_args()
|
|
artifact_root = args.artifact_root.resolve()
|
|
result = {
|
|
"status": "skipped",
|
|
"reason": "shared_weifile_details",
|
|
"channel_name": (args.channel_name or "").strip().lower() or None,
|
|
"artifact_root": str(artifact_root),
|
|
"removed": False,
|
|
"weifile": str(artifact_root / xxbb_build.WEIFILE_ROOT),
|
|
"details": str(artifact_root / xxbb_build.DETAILS_ROOT),
|
|
}
|
|
print("shared /weifile and /details left intact (noop)")
|
|
print(RESULT_MARKER + json.dumps(result, separators=(",", ":")), flush=True)
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|