Skip to content

fix(packaging): use ${arch} instead of hardcoded amd64 in deb template#369

Merged
ewen-poch merged 1 commit into
mainfrom
fix/deb-arch-dynamic
Jul 23, 2026
Merged

fix(packaging): use ${arch} instead of hardcoded amd64 in deb template#369
ewen-poch merged 1 commit into
mainfrom
fix/deb-arch-dynamic

Conversation

@ewen-poch

Copy link
Copy Markdown
Member

Problem

The previous fix (#368) hardcoded amd64 in the deb artifactName to work around ${arch} expanding to x64. But this was based on an incorrect assumption — electron-builder already handles the mapping correctly.

Proposed change

Revert to ${arch} in the deb template: aipoch-${name}_${version}_${arch}.${ext}

electron-builder's getArtifactArchName() (builder-util/out/arch.js:58-67) automatically maps x64amd64 when ext === "deb". So ${arch} expands to amd64 for the current x64 build, and would correctly produce arm64 for a future arm64 build — which the hardcoded version would not.

Scope and non-goals

One-line change. Test fixtures stay as-is (amd64 matches what ${arch} expands to).

Acceptance criteria and validation

  • 11 tests pass (electron-builder-config.test.ts + generate-version-manifest.test.ts)
  • Source: builder-util/out/arch.js:65 confirms ext === "deb"archName = "amd64"

@github-actions github-actions Bot added the bug Something isn't working label Jul 23, 2026
@github-actions

Copy link
Copy Markdown

Codex Correctness Review

Verdict: mergeable

No actionable findings.

electron-builder's getArtifactArchName() automatically maps x64 to
'amd64' when ext === 'deb', so the arch template variable expands
correctly. Hardcoding 'amd64' was unnecessary and would break future
multi-arch builds (e.g. arm64).
@ewen-poch
ewen-poch force-pushed the fix/deb-arch-dynamic branch from 9da640a to 8d76178 Compare July 23, 2026 08:48
@github-actions

Copy link
Copy Markdown

Codex Correctness Review

Verdict: mergeable

No actionable findings.

@ewen-poch
ewen-poch merged commit 1d2aff6 into main Jul 23, 2026
17 of 18 checks passed
@ewen-poch
ewen-poch deleted the fix/deb-arch-dynamic branch July 23, 2026 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant