Restructure GitHub Actions to build Windows and Linux matrix targets and produce platform-specific artifacts. - .github/workflows/dev-build.yml: split cleanup/build jobs, add matrix (win-x64, linux-x64), set SNOWLUMA_TARGET for builds, produce full and -lite archives (.zip on Windows, .tar.gz on Linux), unify upload step and ensure errors when artifacts missing. - .github/workflows/release.yml: convert release build to matrix, produce platform archives, download/collect artifacts, generate multi-platform release notes (bash), and create the GitHub release with both .zip and .tar.gz assets. - packages/core/vite.config.ts: add fs import and SNOWLUMA_TARGET handling, pick platform-specific runtime files (launcher.bat or launcher.sh), enumerate native files per target, fail CI if expected native binaries are missing, and copy native files into dist/native. - packages/runtime/launcher.sh: add a portable launcher for Linux that prefers a bundled node binary or falls back to PATH and execs index.mjs. These changes enable cross-target CI packaging and enforce that native binaries are present before releasing.
17 lines
389 B
Bash
17 lines
389 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
# Prefer bundled node when present; fall back to $PATH.
|
|
if [[ -x "./node" ]]; then
|
|
NODE_BIN="./node"
|
|
else
|
|
NODE_BIN="$(command -v node || true)"
|
|
if [[ -z "$NODE_BIN" ]]; then
|
|
echo "error: 'node' not found on PATH and no bundled ./node; install Node.js >= 22." >&2
|
|
exit 127
|
|
fi
|
|
fi
|
|
|
|
exec "$NODE_BIN" ./index.mjs "$@"
|