Skip to content

Commit 6216aed

Browse files
JohnMcLearclaude
andauthored
fix(release): override package name via extraMetadata for build templates (#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>
1 parent 7eb43cd commit 6216aed

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

packages/desktop/build/electron-builder.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@ appId: org.etherpad.desktop
22
productName: Etherpad Desktop
33
copyright: Copyright (c) 2026 The Etherpad Foundation
44

5+
# Override the package.json#name (`@etherpad/desktop`) for build-time
6+
# artifact templating only. electron-builder uses `${name}` in
7+
# intermediate paths (deb, snap, the .nsis.7z that NSIS reads) and the
8+
# scoped name's `/` becomes a literal directory (deb/snap crash with
9+
# "Parent directory does not exist: release/@etherpad") while the `@`
10+
# prefix makes 7za interpret the .nsis.7z basename as a `@list-file`
11+
# argument ("Could not create destination file: No such file or
12+
# directory"). We can't drop the scope from package.json itself
13+
# without breaking `pnpm --filter @etherpad/desktop`, so override it
14+
# just for the build via extraMetadata.
15+
extraMetadata:
16+
name: etherpad-desktop
17+
518
directories:
619
buildResources: build
720
output: release

0 commit comments

Comments
 (0)