diff --git a/scripts/marketplace-sync.ts b/scripts/marketplace-sync.ts index 7ab10f1b..b08046e9 100644 --- a/scripts/marketplace-sync.ts +++ b/scripts/marketplace-sync.ts @@ -69,14 +69,21 @@ const git = (dir: string, args: string[]): string | null => { /* Which plugins directory to publish FROM. - There are two, and they are not the same thing. `platform/plugins/` holds what this machine has - INSTALLED — updated by `plugins:update`, which is a git pull, and therefore always at whatever version - was last installed. `officer-dev/plugins/` holds every repo in the org, cloned for working on, and is - where a release is actually made. + There is one: `platform/plugins/`, holding what this machine has INSTALLED — updated by + `plugins:update`, which is a git pull, so it sits at whatever version was last installed. - Publishing from the install directory means the catalogue advertises the version this machine happens - to be running rather than the version that was released. That is exactly what happened on 2026-08-27: - 21 plugins were tagged and the store went on showing 1.0.0. + Publishing from it means the catalogue advertises the version this machine happens to be running + rather than the version that was released. That is exactly what happened on 2026-08-27: 21 plugins + were tagged and the store went on showing 1.0.0. + + A second directory — `officer-dev/plugins/`, every repo in the org cloned side by side — was created + to fix that, and never did: its entries were SYMLINKS into this one, so both paths read the same + working copy and published the same version. It was removed on 2026-08-28. + + **The problem is still open, and a second checkout was never the answer.** Each directory here is a + real git repo with its own tags, so the released manifest can be read out of the tag itself — + `git show :manifest.ts` — without caring what is checked out. That is the fix; it is not + written yet, and until it is, this script advertises what is installed. */ const PLUGINS_DIR = process.env.PLUGINS_DIR ?? resolve(import.meta.dir, '..', 'plugins'); diff --git a/scripts/plugins-check.ts b/scripts/plugins-check.ts index 54728c19..38558839 100644 --- a/scripts/plugins-check.ts +++ b/scripts/plugins-check.ts @@ -31,9 +31,14 @@ import { join } from 'node:path'; /* Which plugins directory to check. - There are two as of 2026-08-27: `platform/plugins/` — what this machine has INSTALLED — and - `officer-dev/plugins/`, every repo in the org cloned side by side for working on. They hold different - sets, so the check has to be pointable at either rather than assuming the one it happens to sit next to. + `platform/plugins/` is the one that exists. There was briefly a second — `officer-dev/plugins/`, meant + to hold every repo in the org side by side — and it was removed on 2026-08-28 once it held nothing but + symlinks into this one. A plugin cannot live outside the platform anyway: Bun resolves a symlink to its + real path, so `@@/…` and every relative import fail from there. Tested, including + `--preserve-symlinks`, which Bun accepts and ignores. + + `PLUGINS_DIR` stays overridable for a checkout somewhere else, which costs nothing and is the only + reason this is not a constant. */ const PLUGINS_DIR = process.env.PLUGINS_DIR ?? join(import.meta.dir, '..', 'plugins'); const HOST = 'git@gitea.officer.dev';