mirror of
https://github.com/davidkaya/aryx.git
synced 2026-07-23 21:18:40 +02:00
Replace zip/tar archive distribution with platform-native installers: - Windows: NSIS installer (.exe) with per-user install to %LOCALAPPDATA%\Programs\Aryx, Start Menu and Desktop shortcuts, Add/Remove Programs registration, and silent install support - macOS: DMG disk image (.dmg) with drag-to-Applications experience via create-dmg - Linux: Debian package (.deb) with /opt/aryx installation, /usr/bin/aryx symlink, desktop entry, hicolor icons, and libsecret-1-0 dependency declaration Add scripts/create-installer.ts as the platform-dispatching entry point. Update CI workflow to produce native installers instead of archives. Add installerAssetName to ReleaseTarget interface. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
69 lines
2.1 KiB
TypeScript
69 lines
2.1 KiB
TypeScript
import { describe, expect, test } from 'bun:test';
|
|
|
|
import {
|
|
macBundleIdentifier,
|
|
productName,
|
|
resolveReleaseTarget,
|
|
} from '../../scripts/releaseTarget';
|
|
|
|
describe('resolveReleaseTarget', () => {
|
|
test('maps Windows x64 to the expected runtime and output names', () => {
|
|
expect(resolveReleaseTarget('win32', 'x64')).toEqual({
|
|
platform: 'win32',
|
|
arch: 'x64',
|
|
platformLabel: 'windows',
|
|
dotnetRuntime: 'win-x64',
|
|
outputDirectoryName: 'Aryx-windows-x64',
|
|
archiveBaseName: 'Aryx-windows-x64',
|
|
installerAssetName: 'Aryx-windows-x64-setup.exe',
|
|
sidecarExecutableName: 'Aryx.AgentHost.exe',
|
|
packagedExecutableName: 'Aryx.exe',
|
|
});
|
|
});
|
|
|
|
test('maps macOS arm64 to the expected bundle metadata', () => {
|
|
expect(resolveReleaseTarget('darwin', 'arm64')).toEqual({
|
|
platform: 'darwin',
|
|
arch: 'arm64',
|
|
platformLabel: 'macos',
|
|
dotnetRuntime: 'osx-arm64',
|
|
outputDirectoryName: 'Aryx-macos-arm64',
|
|
archiveBaseName: 'Aryx-macos-arm64',
|
|
installerAssetName: 'Aryx-macos-arm64.dmg',
|
|
sidecarExecutableName: 'Aryx.AgentHost',
|
|
appBundleName: 'Aryx.app',
|
|
});
|
|
});
|
|
|
|
test('maps Linux x64 to the expected runtime and output names', () => {
|
|
expect(resolveReleaseTarget('linux', 'x64')).toEqual({
|
|
platform: 'linux',
|
|
arch: 'x64',
|
|
platformLabel: 'linux',
|
|
dotnetRuntime: 'linux-x64',
|
|
outputDirectoryName: 'Aryx-linux-x64',
|
|
archiveBaseName: 'Aryx-linux-x64',
|
|
installerAssetName: 'aryx-linux-x64.deb',
|
|
sidecarExecutableName: 'Aryx.AgentHost',
|
|
packagedExecutableName: 'Aryx',
|
|
});
|
|
});
|
|
|
|
test('exports the expected product metadata constants', () => {
|
|
expect(productName).toBe('Aryx');
|
|
expect(macBundleIdentifier).toBe('com.davidkaya.aryx');
|
|
});
|
|
|
|
test('rejects unsupported platforms', () => {
|
|
expect(() => resolveReleaseTarget('freebsd', 'x64')).toThrow(
|
|
'Unsupported release platform: freebsd',
|
|
);
|
|
});
|
|
|
|
test('rejects unsupported architectures', () => {
|
|
expect(() => resolveReleaseTarget('linux', 'ia32')).toThrow(
|
|
'Unsupported architecture for linux: ia32',
|
|
);
|
|
});
|
|
});
|