mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
fix(cli): build runtime assets during dev setup
This commit is contained in:
parent
c7e6b5001d
commit
2ccefa57e4
6 changed files with 85 additions and 7 deletions
|
|
@ -942,6 +942,16 @@ async function buildArtifacts(layout) {
|
|||
await assertPathExists(artifactManifestPath(layout), 'artifact manifest');
|
||||
}
|
||||
|
||||
async function buildRuntimeWheelAssets(layout) {
|
||||
await rm(layout.pythonDir, { recursive: true, force: true });
|
||||
await mkdir(layout.pythonDir, { recursive: true });
|
||||
|
||||
const [, wheelCommand] = buildArtifactCommands(layout);
|
||||
await runCommand(wheelCommand.command, wheelCommand.args, { cwd: wheelCommand.cwd });
|
||||
const pythonArtifacts = await findPythonArtifacts(layout.pythonDir);
|
||||
await copyRuntimeWheelAssets(layout, pythonArtifacts);
|
||||
}
|
||||
|
||||
async function verifyNpmArtifacts(layout, tmpRoot) {
|
||||
for (const packageInfo of NPM_ARTIFACT_PACKAGES) {
|
||||
await assertPathExists(layout.npmTarballs[packageInfo.name], `${packageInfo.name} tarball`);
|
||||
|
|
@ -1011,6 +1021,10 @@ async function main() {
|
|||
await buildArtifacts(layout);
|
||||
return;
|
||||
}
|
||||
if (command === 'build-runtime') {
|
||||
await buildRuntimeWheelAssets(layout);
|
||||
return;
|
||||
}
|
||||
if (command === 'verify') {
|
||||
await verifyArtifacts(layout);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue