mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 09:27:29 +00:00
* refactor(tooling): organize test runtime and maintenance owners * test(tooling): preserve relocated runtime fixture dependency edges * refactor(tooling): preserve xterm routing owner checks * ci(tooling): include routing owner in sparse checkout * test(tooling): preserve copied workflow dependency closures * fix(tooling): normalize hashed JSON assets in release parity * fix(tooling): distinguish asset aliases from literal references * fix(tooling): frame normalized asset reference payloads * fix(tooling): normalize decoded JSON asset references * refactor(tooling): organize build, CI and release owners * fix(tooling): align moved generator and workflow path contracts * fix(tooling): update generated plugin bundle owner banners * test(tooling): create relocated mobile verifier fixture directories * test(tooling): copy headless detector dependency closure * test(tooling): align native batch policy fixtures with owner path * fix(tooling): link moved reliability command to historical evidence * fix(tooling): preserve nested sandbox owners and canonical guide source * fix(tooling): target release version owners in checkout fixture
33 lines
1.2 KiB
JavaScript
33 lines
1.2 KiB
JavaScript
#!/usr/bin/env node
|
|
// Prints `toolchain=` and `app-version=` cache-key outputs for the Windows Rust executables.
|
|
// rustc goes in restore-key prefixes because the exe reuse fingerprint does not cover it.
|
|
import { spawnSync } from 'node:child_process'
|
|
import { readFileSync } from 'node:fs'
|
|
import { join, resolve } from 'node:path'
|
|
|
|
function run(command, args) {
|
|
const result = spawnSync(command, args, {
|
|
encoding: 'utf8',
|
|
stdio: ['ignore', 'pipe', 'inherit']
|
|
})
|
|
if (result.error || result.status !== 0) {
|
|
throw new Error(
|
|
`${command} ${args.join(' ')} failed: ${result.error?.message ?? result.status}`
|
|
)
|
|
}
|
|
return result.stdout
|
|
}
|
|
|
|
const root = resolve(import.meta.dirname, '../../../..')
|
|
if (spawnSync('cargo', ['--version'], { stdio: 'ignore' }).status !== 0) {
|
|
run('rustup', ['toolchain', 'install', 'stable', '--profile', 'minimal'])
|
|
run('rustup', ['default', 'stable'])
|
|
}
|
|
const rustc = /^rustc (\S+)/.exec(run('rustc', ['--version']))?.[1]
|
|
const { version } = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'))
|
|
if (!rustc || !version) {
|
|
throw new Error('Missing rustc or package.json version')
|
|
}
|
|
console.log(`toolchain=rustc${rustc}`)
|
|
console.log(`app-version=${version}`)
|