All-platforms VSIX + the release flow consolidated in one script
A 7th package, lucisv-<v>-all.vsix, carries every platform's binary pair under bin/<platform>-<arch>/ and the extension picks the right one at runtime — flat bin/ (platform package) first, then the platform-arch subdirectory, then PATH. Target-less on purpose, so Alpine and anything else vsce refuses to name gets working static binaries. The release.yml inline prune step moves into tools/prune_release_assets.sh, which now requires all seven packages by name before anything is published. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
0a93143bfb
commit
cebb333bd7
8 files changed
+662
-107
No files matched your search
+31
-19
@@ -26,20 +26,23 @@ for shops that require a native glibc link.
|
||||
that carries those two binaries inside it, so installing the extension needs no
|
||||
separate binary install (`docs/features/editor-platform-vsix/README.md`). The
|
||||
platform-independent `.vsix` — the same JavaScript, no binaries, server looked
|
||||
up on `PATH` — is still built as the universal fallback.
|
||||
up on `PATH` — is still built as the universal fallback, and one more package,
|
||||
`lucisv-<version>-all.vsix`, carries **all five pairs at once**.
|
||||
|
||||
| vsce target | rust triple |
|
||||
| package | rust triple |
|
||||
|---|---|
|
||||
| `darwin-arm64` | `aarch64-apple-darwin` (host; built without `--cross` too) |
|
||||
| `darwin-x64` | `x86_64-apple-darwin` |
|
||||
| `linux-x64` | `x86_64-unknown-linux-musl` |
|
||||
| `linux-arm64` | `aarch64-unknown-linux-musl` |
|
||||
| `win32-x64` | `x86_64-pc-windows-gnu` |
|
||||
| `all` | all five of the above, under `bin/<platform>-<arch>/` |
|
||||
|
||||
`x86_64-unknown-linux-gnu` deliberately gets no package: `linux-x64` ships the
|
||||
static musl build, which runs on any distro. Alpine's own `alpine-x64` /
|
||||
`alpine-arm64` targets are not built either, so VS Code on Alpine falls back to
|
||||
the universal package — an accepted gap, recorded in the feature README.
|
||||
`alpine-arm64` targets are not built either, so VS Code on Alpine is never
|
||||
offered a targeted package — the `all` package covers it instead, since it
|
||||
carries no `--target` and Alpine's `process.platform` is plain `linux`.
|
||||
|
||||
One-time setup on the build Mac (2026-08-25, all via Homebrew):
|
||||
|
||||
@@ -132,9 +135,11 @@ dist/
|
||||
SHA256SUMS
|
||||
```
|
||||
|
||||
With `--cross` the loose binaries appear for all six triples and the remaining
|
||||
four platform packages (`darwin-x64`, `linux-x64`, `linux-arm64`, `win32-x64`)
|
||||
join them — twelve binaries and six `.vsix` files, plus `SHA256SUMS`.
|
||||
With `--cross` the loose binaries appear for all six triples, the remaining four
|
||||
platform packages (`darwin-x64`, `linux-x64`, `linux-arm64`, `win32-x64`) join
|
||||
them, and so does the all-platforms `lucisv-<version>-all.vsix` — twelve
|
||||
binaries and **seven** `.vsix` files, plus `SHA256SUMS`. The `all` package needs
|
||||
all five pairs to exist, so it is the one artifact a plain run cannot produce.
|
||||
|
||||
Verify the checksums the way a downloader would:
|
||||
|
||||
@@ -182,12 +187,15 @@ npx @vscode/vsce package --target darwin-arm64 \
|
||||
`unzip -l dist/lucisv-<version>.vsix | grep syntaxes` must print the grammar —
|
||||
without it, hover cards ship unhighlighted.
|
||||
- **`editors/vscode/bin/` is transient.** `release.sh` stages one platform's
|
||||
pair into it, packages, and removes it again, with an `EXIT` trap so a failed
|
||||
run cannot leave binaries in the working tree; it is gitignored as a second
|
||||
line of defence. Every package is then asserted with
|
||||
pair into it (or, for the `all` package, all five pairs into
|
||||
`bin/<platform>-<arch>/` subdirectories), packages, and removes it again, with
|
||||
an `EXIT` trap so a failed run cannot leave binaries in the working tree; it is
|
||||
gitignored as a second line of defence. Every package is then asserted with
|
||||
`unzip -Z1 <vsix> 'extension/bin/*'`: nothing for the universal one, exactly
|
||||
`lucisv` and `lucisv-server` (`.exe` for `win32-x64`) for a platform one. A
|
||||
stale `bin/` would otherwise ship one platform's server to another's users.
|
||||
`lucisv` and `lucisv-server` (`.exe` for `win32-x64`) for a platform one, and
|
||||
exactly ten entries under five subdirectories for the `all` one — Info-ZIP's
|
||||
`*` matches `/`, so one pattern covers both layouts. A stale `bin/` would
|
||||
otherwise ship one platform's server to another's users.
|
||||
|
||||
## 5. Install / distribute
|
||||
|
||||
@@ -204,10 +212,13 @@ code --install-extension dist/lucisv-0.7.0.vsix # or: server from
|
||||
The platform package is the one to hand a user: it carries `lucisv` and
|
||||
`lucisv-server` for that machine, so the two `install -m 755` lines above become
|
||||
optional. Pick the package by machine — `darwin-arm64`, `darwin-x64`,
|
||||
`linux-x64`, `linux-arm64`, `win32-x64` — and fall back to the universal
|
||||
`lucisv-<version>.vsix` anywhere else.
|
||||
`linux-x64`, `linux-arm64`, `win32-x64`. When the machine is *not* known in
|
||||
advance — a mixed fleet, an offline mirror, Alpine — hand over
|
||||
`lucisv-<version>-all.vsix` instead: same binaries, all five platforms in the
|
||||
one file, at ~13 MB rather than ~3 MB. The universal `lucisv-<version>.vsix`
|
||||
remains the no-binaries fallback.
|
||||
|
||||
Publishing means attaching the six `.vsix` packages plus `SHA256SUMS` to a
|
||||
Publishing means attaching the seven `.vsix` packages plus `SHA256SUMS` to a
|
||||
git tag / release page on `git.luci.ooo` — the CI release does exactly that
|
||||
and nothing more (the loose binaries stay unpublished; see "CI releases"
|
||||
below). Tag after the gate is green:
|
||||
@@ -264,10 +275,11 @@ git push origin v<X.Y.Z>
|
||||
```
|
||||
|
||||
does the rest on the `mac-arm64` runner: `tools/release.sh --cross`, a
|
||||
tag-vs-`lucisv --version` consistency check, a pruning step that keeps
|
||||
**only the six `.vsix` packages** in `dist/` (each checked by name — a
|
||||
missing platform package fails the release — and `SHA256SUMS` filtered
|
||||
down to them and re-verified), `tools/release_notes.sh` (a missing
|
||||
tag-vs-`lucisv --version` consistency check,
|
||||
`tools/prune_release_assets.sh dist <version>`, which keeps **only the
|
||||
seven `.vsix` packages** in `dist/` (each checked by name — a missing
|
||||
package fails the release — and `SHA256SUMS` filtered down to them and
|
||||
re-verified), `tools/release_notes.sh` (a missing
|
||||
CHANGELOG section fails the release), and `tools/publish_release.sh`,
|
||||
which creates the Gitea release and attaches what remains. The loose
|
||||
binaries are built and audited on the runner — the packages are made
|
||||
|
||||
Reference in new issue
Block a user