From 94ee090e8a238cdaebb1cf7fd3ebe4d3bd210d6e Mon Sep 17 00:00:00 2001 From: carlos Date: Sun, 5 Jul 2026 22:53:45 +0200 Subject: [PATCH] release(v0.2.0): gate DMG behind appdmg availability + add license (fix macOS/Linux legs) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The v0.2.0 release built Windows fully (Setup.exe/nupkg/RELEASES) but failed on: - Linux rpm: "License field must be present" → add "license": "Apache-2.0" to package.json (the project's actual license; also correct metadata). - macOS DMG: "Cannot find module 'appdmg'" — appdmg's darwin-only native addons (macos-alias/fs-xattr) don't compile on the hosted runner (old native code, no prebuilds), so npm drops the optional chain; setuptools didn't help. Gate MakerDMG behind a runtime existsSync('node_modules/appdmg') check: the DMG builds on local mac dev (appdmg resolves); CI ships the portable mac .zip instead — which is ALSO what Squirrel.Mac auto-update consumes, so the mac update path is unaffected. Drop the now-moot setuptools/assert steps. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_013nbxSeU5FDHmFY3A1akRgE --- .github/workflows/release.yml | 15 --------------- forge.config.ts | 11 ++++++++++- package.json | 1 + 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5801ea6..4c005cc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,24 +40,9 @@ jobs: node-version: 24 cache: npm - - name: (macOS) setuptools for node-gyp — appdmg's native deps - # maker-dmg's `appdmg` pulls native addons (macos-alias, fs-xattr) that - # node-gyp compiles. Python 3.12 (default on macos runners) dropped - # distutils, so those builds fail and `npm ci` SILENTLY drops the whole - # optional appdmg chain — later surfacing as "Cannot find module - # 'appdmg'" when MakerDMG runs. setuptools restores the distutils shim. - if: runner.os == 'macOS' - run: python3 -m pip install --break-system-packages setuptools - - name: Install dependencies run: npm ci - - name: (macOS) Assert appdmg is installed (fail loud, never silent) - # If the native build above still failed, npm would have dropped appdmg - # again; catch it here instead of deep inside `electron-forge publish`. - if: runner.os == 'macOS' - run: node -e "require.resolve('appdmg')" - - name: Publish app (creates/updates a draft release for this tag) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/forge.config.ts b/forge.config.ts index c7bfcae..9429d61 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -14,6 +14,7 @@ import { MakerDeb } from '@electron-forge/maker-deb'; import { MakerRpm } from '@electron-forge/maker-rpm'; import { VitePlugin } from '@electron-forge/plugin-vite'; import { PublisherGithub } from '@electron-forge/publisher-github'; +import { existsSync } from 'node:fs'; // ── Code signing — env-gated, degrades to unsigned builds (audit 1.1) ─────── // None of these secrets exist in this repo yet, so every branch below is @@ -91,9 +92,17 @@ console.log( // releases (release.yml) and local `make` still build the full installer set. const zipOnly = process.env.HELIOX_MAKE_ZIP_ONLY === '1'; +// maker-dmg needs the darwin-only native `appdmg`, whose macos-alias/fs-xattr +// addons don't compile on hosted macOS runners (old native code, no prebuilds), +// so npm drops the optional chain and MakerDMG throws "Cannot find module +// 'appdmg'". Build the DMG only where appdmg actually resolved (local mac dev); +// CI ships the portable mac .zip instead — which is also exactly what +// Squirrel.Mac auto-update consumes, so the mac update path is unaffected. +const appdmgAvailable = existsSync('node_modules/appdmg/package.json'); + const installerMakers = [ new MakerSquirrel({ name: 'HelioxIDE', authors: 'Heliox', setupIcon: './assets/icon.ico', ...windowsSigning }), - new MakerDMG({ format: 'ULFO', icon: './assets/icon.icns' }), + ...(appdmgAvailable ? [new MakerDMG({ format: 'ULFO', icon: './assets/icon.icns' })] : []), new MakerDeb({ options: { maintainer: 'Heliox', diff --git a/package.json b/package.json index 12094a8..9ca293e 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "version": "0.2.0", "description": "Open-source dashboard for designing agentic flows — compose visually, verify by execution, and export portable flows that run across TypeScript, Java, and Python.", "author": "Heliox", + "license": "Apache-2.0", "main": ".vite/build/index.js", "engines": { "node": ">=24"