"""Rebuild + push ONLY the marketplace repo (index, README with provenance pie).""" import os import shutil import sys sys.path.insert(0, os.path.dirname(__file__)) import p4_publish as p4 slugs = sorted(d for d in os.listdir(p4.SKILLS_DIR) if os.path.isdir(os.path.join(p4.SKILLS_DIR, d))) market = p4.build_marketplace_dir(slugs) try: p4.ensure_repo("skills-core", "marketplace", "skillfactor marketplace index") p4.push_dir("skills-core", "marketplace", market, "docs: marketplace index + README (adds AI-skill-pack provenance)") print(f"marketplace pushed ({len(slugs)} packages indexed)") finally: shutil.rmtree(market, ignore_errors=True)