接口开始5%
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
import { validateAssetBuildManifest } from './asset-build-manifest.mjs'
|
||||
import { resolvePythonExecutable, runPythonCommand } from './python-runtime.mjs'
|
||||
|
||||
const scriptDirectory = path.dirname(fileURLToPath(import.meta.url))
|
||||
const pipelineDirectory = path.resolve(scriptDirectory, '..')
|
||||
const workspace = path.resolve(pipelineDirectory, '..')
|
||||
const manifestPath = path.join(pipelineDirectory, 'manifests', 'shared-scroll-skins-v3.json')
|
||||
const reportPath = path.join(pipelineDirectory, 'generated', 'shared-scroll-skins-v3', 'quality-report.json')
|
||||
const python = resolvePythonExecutable({ pipelineDirectory })
|
||||
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'))
|
||||
|
||||
validateAssetBuildManifest(manifest, workspace)
|
||||
|
||||
// Node 只负责编排锁定的清单和 Python 工具;像素处理与质量分析各自只有一个实现。
|
||||
function run(script, args) {
|
||||
runPythonCommand({
|
||||
executable: python,
|
||||
args: [path.join(scriptDirectory, script), ...args],
|
||||
cwd: workspace,
|
||||
})
|
||||
}
|
||||
|
||||
run('build_scroll_skins.py', [manifestPath, '--workspace', workspace])
|
||||
run('verify-assets.py', [manifestPath, '--workspace', workspace, '--report', reportPath])
|
||||
Reference in New Issue
Block a user