Moving the marketplace app to a submodule
The public marketplace site (apps/marketplace) is being extracted into its own
repository and re-attached to this monorepo as a git submodule:
- Target repo:
git@github.com:lumibase-ai/marketplace.git - Mount path:
apps/marketplace(unchanged — the@lumibase/marketplaceworkspace package keeps its path, sopnpm-workspace.yaml'sapps/*glob still picks it up once the submodule is checked out).
Why this isn't done automatically
The automation that prepared this change is scoped to khuepm/lumibase and has
no push access to lumibase-ai/*. The extraction therefore ships as a
runnable script — run it from a machine (or CI) that can push to
lumibase-ai/marketplace.
Prerequisites
lumibase-ai/marketplaceexists and is empty (or willing to accept a freshmain).- Your git remote has push access to it (SSH key or PAT).
- Run from a clean working tree at the repo root.
Run it
# Dry run — prints every git command without executing:
./scripts/marketplace-submodule-migration.sh
# Execute for real:
APPLY=1 ./scripts/marketplace-submodule-migration.sh
# Execute, overwriting scaffolding (README/license) on the remote's main:
FORCE=1 APPLY=1 ./scripts/marketplace-submodule-migration.sh
Overridable env vars: MARKETPLACE_REPO_URL, MARKETPLACE_BRANCH, FORCE.
If the push is rejected ("fetch first" / non-fast-forward)
The target repo already has commits on main — almost always the initial
README/license GitHub adds when you create a repo through the UI. The
extracted subtree history is a separate root, so it can't fast-forward.
- Discard that scaffolding (safe when
mainis just the auto-init commit): re-run withFORCE=1— it pushes with--force(a--force-with-leasecan't be used on an ad-hoc URL push: with no remote-tracking ref it always rejects with "stale info"). - Keep the remote history: push to a side branch and reconcile via PR:
bash
git push git@github.com:lumibase-ai/marketplace.git marketplace-export:import-app
The script stops before touching the monorepo, so a rejected push leaves
apps/marketplace intact — just resolve the push and re-run.
What it does
git subtree split --prefix=apps/marketplace— extracts the full history of the app onto a temporarymarketplace-exportbranch (every commit that touched the folder is preserved).- Pushes that history to
lumibase-ai/marketplaceasmain. git rm -r apps/marketplaceand commits the removal from the monorepo.git submodule addat the same path and commits the submodule pointer.- Deletes the temporary export branch.
After the move
.gitmoduleswill list bothextensionsandapps/marketplace.- Contributors:
git submodule update --init --recursiveafter pulling. - CI: enable submodule checkout (
actions/checkoutwithsubmodules: recursive). - Bumping the app = committing a new submodule SHA in the monorepo (or a
git submodule update --remote).