From cdbc88036bb99cf707b581483ca4ab99a08bdcef Mon Sep 17 00:00:00 2001 From: Byron Gamatos Date: Fri, 3 Jul 2026 11:31:53 +0200 Subject: [PATCH] fix(release): glob the win launcher exe (productName is sanitized to feedback.exe) (#69) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit electron-builder strips the brackets from productName 'fee[dB]ack' → the win launcher is 'feedback.exe', so deriving --mainExe from raw productName ('fee[dB]ack.exe') didn't match. Glob release/win-unpacked/*.exe instead (single root exe), mirroring the mac .app glob. Confirmed via the fail-loud guard on the v0.3.0-alpha.1 build. Co-authored-by: Claude Opus 4.8 (1M context) --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23105b1..7affda0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -320,13 +320,13 @@ jobs: shell: bash run: | set -euo pipefail - # The launcher exe is named after productName (electron-builder - # 'dir' target), not the packId. Velopack otherwise looks for - # .exe and fails. Derive it from package.json so a rebrand - # can't break the pack. - mainexe="$(node -p "require('./package.json').build.productName").exe" - if [[ ! -f "release/win-unpacked/${mainexe}" ]]; then - echo "::error::Launcher release/win-unpacked/${mainexe} not found"; ls -1 release/win-unpacked/*.exe || true; exit 1 + # The launcher exe is the electron-builder 'dir' output, whose name is + # the SANITIZED productName (e.g. fee[dB]ack -> feedback.exe), not the + # raw productName or the packId. Find it dynamically — there's a + # single .exe at the win-unpacked root. + mainexe=$(basename "$(ls release/win-unpacked/*.exe 2>/dev/null | head -n1)") + if [[ -z "${mainexe:-}" ]]; then + echo "::error::No .exe launcher in release/win-unpacked/"; ls -1 release/win-unpacked/ | head -20; exit 1 fi vpk pack \ --packId Slopsmith \