fix(release): unbreak Linux deb + Snap + Windows builds post-monorepo#47
Merged
Conversation
Three regressions surfaced when v0.4.0 (the first release-please run under the new monorepo layout) tried to build: 1. Linux `.deb` — fpm failed with "Parent directory does not exist: .../release/@etherpad". electron-builder defaults the deb artifact path + executable name to `package.json#name`, which is now the scoped `@etherpad/desktop`. The `/` from the scope became a directory in the output path. 2. Snap — `expected argument for flag '--executable'` followed by `ERR_ELECTRON_BUILDER_CANNOT_EXECUTE`. Same root cause as deb: the snap `--executable` argument can't carry a scoped name. 3. Windows — `[fetch-etherpad] failed: spawn pnpm ENOENT`. The embedded-server fetch script spawned `pnpm` without going through a shell, but on Windows pnpm resolves to `pnpm.cmd` which Node's `child_process.spawn` won't find without `shell: true`. Fixes: - Add `linux.executableName: etherpad-desktop` to `packages/desktop/build/electron-builder.yml`. That pins a slash-free name for both deb and snap targets in one shot. - Add `shell: process.platform === 'win32'` to the `spawn` call in `packages/desktop/scripts/fetch-etherpad.mjs`. Same pattern we used upstream in ether/etherpad's `admin/scripts/gen-api.mjs`. These are pre-existing post-#29/#30 regressions; v0.3.2 was built before the monorepo move, so its non-scoped root name shielded it. The macOS build + Linux AppImage already succeed at v0.4.0, so this PR's verification is the next tag rebuild. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
Merged
2 tasks
JohnMcLear
added a commit
that referenced
this pull request
May 12, 2026
…ates (#49) PR #47 added linux.executableName to fix snap's `--executable` flag and the deb binary name — but the deb / snap output PATHS still come from electron-builder's default artifactName templates which use the ${name} token (= package.json#name). That's now `@etherpad/desktop` (scoped after the monorepo move), so: - deb / snap write to `release/@etherpad/desktop_*` and crash with "Parent directory does not exist: release/@etherpad" - Windows NSIS intermediate `release/@etherpaddesktop-*.nsis.7z` trips 7za's `@listfile` convention and fails with "Could not create destination file: No such file or directory" Setting `extraMetadata.name: etherpad-desktop` in the electron-builder config overrides package.json#name at build time without touching the actual package.json (which we need to keep as `@etherpad/desktop` for `pnpm --filter` and workspace deps). Every artifact template that interpolates ${name} now sees the slash-free name and the path issue goes away in one move. Verified by inspecting the v0.4.1 build logs for both remaining failures: - linux deb: fpm `--p ... cannot write to release/@etherpad/desktop_0.4.1_amd64.deb` - snap: mksquashfs `Could not create destination file` on the same path shape (release/@etherpad/desktop_0.4.1_amd64.snap) - win nsis: 7za `Could not create destination file` on release\@etherpaddesktop-0.4.1-x64.nsis.7z (@-prefix triggers 7za's @ListFile mode) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v0.4.0 was the first tag built under the new pnpm monorepo layout (PRs #29/#30, May 5). Three of the five release targets failed; only macOS (DMG + ZIP, both arches) and Linux AppImage made it into the draft release.
The three regressions:
Linux
.deb— fpm fatal:Parent directory does not exist: .../release/@etherpad - cannot write to .../release/@etherpad/desktop_0.4.0_amd64.deb. electron-builder usespackage.json#nameas the default deb artifact path + executable name. The new scoped name@etherpad/desktopmakes the/literal in the output path.Snap —
expected argument for flag '--executable'followed byERR_ELECTRON_BUILDER_CANNOT_EXECUTE. Same cause: the snap--executableflag can't carry a scoped name.Windows —
[fetch-etherpad] failed: spawn pnpm ENOENT. The embedded-server fetch script spawnspnpmdirectly, but on Windows pnpm resolves topnpm.cmdand Node'schild_process.spawnwon't find shims withoutshell: true.Changes
Test plan
Notes
🤖 Generated with Claude Code