Files
Hy2026/scripts/build.mjs
T
Rafał Tyński a9815b54e0 fix(infra): fix Dockerfile restore and build script solution name
Copy the layered project files before restore so the Docker build resolves project references, and build the correct solution file (TarninaHub.slnx) in scripts/build.mjs.
2026-10-04 01:50:01 +02:00

21 lines
637 B
JavaScript

import { spawnSync } from 'node:child_process'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
function run(command) {
console.log(`\n> ${command}`)
const result = spawnSync(command, { cwd: root, stdio: 'inherit', shell: true })
if (result.status !== 0) {
console.error(`\n[build] Command failed: ${command}`)
process.exit(result.status ?? 1)
}
}
run('npm --prefix client run build')
run('node scripts/copy-client.mjs')
run('dotnet build TarninaHub.slnx --configuration Release')
console.log('\n[build] Done.')