fix(snap): update make:snap command to include debug environment variable and remove unnecessary build environment setting

This commit is contained in:
Ivan
2026-04-22 18:37:53 -05:00
parent 54e2728c6f
commit c0312bf1a0
3 changed files with 5 additions and 16 deletions
+4 -14
View File
@@ -1,16 +1,6 @@
#!/usr/bin/env bash
# Build a Snap via electron-forge's @electron-forge/maker-snap.
#
# Expects ``meshchatx/public/`` to already contain a prebuilt frontend bundle
# (downloaded from the reusable Frontend build workflow), so this script only
# rebuilds the cx_Freeze backend before running ``electron-forge make``.
#
# Required system packages (installed by the workflow):
# - snapcraft (installed via ``snap install snapcraft --classic``)
# - LXD or multipass when building outside ``--use-lxd``/``--destructive-mode``
# (electron-forge invokes snapcraft itself; we set
# ``SNAPCRAFT_BUILD_ENVIRONMENT=host`` so the snap is built directly on the
# runner without needing a build VM).
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
@@ -27,6 +17,6 @@ pnpm run electron-postinstall
pnpm run version:sync
pnpm run build-backend
SNAPCRAFT_BUILD_ENVIRONMENT="${SNAPCRAFT_BUILD_ENVIRONMENT:-host}" \
FORGE_MAKE_SNAP=1 \
node scripts/electron-forge-local-tmp.js make --targets @electron-forge/maker-snap
export DEBUG="${DEBUG:+$DEBUG,}electron-installer-snap:snapcraft"
FORGE_MAKE_SNAP=1 node scripts/electron-forge-local-tmp.js make --targets @electron-forge/maker-snap