mirror of
https://github.com/whyour/qinglong.git
synced 2026-11-02 15:56:59 +08:00
Package production dependencies per architecture for online and offline upgrades. Validate dependencies and isolated backend startup before readiness, repair once when permitted, and preserve service/data through failed preparation or rollback. Publish release bundles with master images and expose an opt-in develop build sharing the development index across Alpine and Debian images.
23 lines
727 B
JavaScript
23 lines
727 B
JavaScript
const path = require('node:path');
|
|
require('../cli/node_modules/esbuild').buildSync({
|
|
entryPoints: [path.resolve(__dirname, '../shell/install-bundle.cjs')],
|
|
outfile: path.resolve(process.argv[2] || 'output/upgrade/install-bundle.cjs'),
|
|
bundle: true,
|
|
platform: 'node',
|
|
format: 'cjs',
|
|
target: 'node20',
|
|
minify: true,
|
|
legalComments: 'inline',
|
|
});
|
|
const { spawnSync } = require('node:child_process');
|
|
const result = spawnSync(
|
|
process.execPath,
|
|
[path.resolve(process.argv[2] || 'output/upgrade/install-bundle.cjs')],
|
|
{ encoding: 'utf8' },
|
|
);
|
|
if (
|
|
result.status !== 1 ||
|
|
!result.stderr.includes('Usage: node install-bundle.cjs')
|
|
)
|
|
throw new Error('Standalone offline installer did not start correctly');
|