Files
luma-home/tools/deploy.mjs
T
Kaloyan DanchevandClaude Opus 4.6 cbea5a322f
CI / Identify a merged version PR (push) Canceled after 0s
CI / Rust checks, rendering, and native package (push) Canceled after 0s
CI / Publish release and Homebrew feed (push) Canceled after 0s
Release PR / Maintain Version Packages PR (push) Canceled after 0s
Merge Luma launcher fork into monorepo
Move trampoline files (boot-hook, watcher, overlay) into trampoline/
subdirectory. Add upstream Luma v2.3.1 source at repo root with our
additions:

- Page::Ha (4th nav tab) with placeholder empty state
- HA tab config schema and default entity mapping (ha-home/)
- Nav keys renamed: "home" → "start", new "ha" tab between Apps and Settings
- All state.rs/view.rs/main.rs/tests.rs updated for 4-tab navigation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-10-24 11:52:55 +03:00

27 lines
1.0 KiB
JavaScript

import fs from 'node:fs/promises';
import path from 'node:path';
import { spawnSync } from 'node:child_process';
const root = path.resolve(import.meta.dirname, '..');
const deviceIndex = process.argv.indexOf('--device');
const device = deviceIndex >= 0 ? process.argv[deviceIndex + 1] : 'tv';
if (!device || !/^[a-zA-Z0-9_-]+$/.test(device))
throw new Error('Pass an ares device profile: pnpm run deploy --device tv');
const manifest = JSON.parse(await fs.readFile(path.join(root, 'appinfo.json'), 'utf8'));
for (const [tool, args] of [
[
'ares-install',
['--device', device, path.join(root, 'dist', `${manifest.id}_${manifest.version}_arm.ipk`)],
],
['ares-launch', ['--device', device, manifest.id]],
]) {
const cli = path.join(root, 'node_modules/@webos-tools/cli/bin', `${tool}.js`);
const result = spawnSync(process.execPath, [cli, ...args], {
cwd: root,
stdio: 'inherit',
timeout: 120000,
});
if (result.error) throw result.error;
if (result.status !== 0) process.exit(result.status ?? 1);
}