同步主站 Cocos 当前工程:关卡资源、运行脚本与打包工具。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -65,8 +65,8 @@ const lines = [
|
||||
'## 上传后验证',
|
||||
`curl -I "${base}/Build/mstest5.loader.js"`,
|
||||
`curl -I "${base}/StreamingAssets/aa/catalog.json"`,
|
||||
`curl -I "${base}/levels-database.json"`,
|
||||
...bundleNames.map((n) => `curl -I "${base}/StreamingAssets/aa/WebGL/${n}"`),
|
||||
`curl -I "${base}/levels-db-index.json.br"`,
|
||||
...bundleNames.map((n) => `curl -I "${base}/StreamingAssets/aa/WebGL/${n}.br"`),
|
||||
];
|
||||
fs.writeFileSync(manifestPath, lines.join('\n'), 'utf8');
|
||||
|
||||
@@ -80,7 +80,7 @@ const readme = [
|
||||
` ${packDir}/`,
|
||||
' ├── Build/',
|
||||
' ├── StreamingAssets/',
|
||||
' └── levels-database.json(.br)',
|
||||
' └── levels-db-index.json(.br)',
|
||||
'',
|
||||
'本地: import-to-unity.sh → scratch-gui/static/unity/(同上结构)',
|
||||
'CDN: 上传运行时包全部内容 → config.js unitycdndir + usecdn:true',
|
||||
@@ -98,8 +98,14 @@ if (makeZip) {
|
||||
zipPath = path.join(path.dirname(packDir), 'mstest5-runtime.zip');
|
||||
if (fs.existsSync(zipPath)) fs.unlinkSync(zipPath);
|
||||
const items = ['Build', 'StreamingAssets'];
|
||||
if (fs.existsSync(path.join(packDir, 'levels-database.json'))) items.push('levels-database.json');
|
||||
if (fs.existsSync(path.join(packDir, 'levels-database.json.br'))) items.push('levels-database.json.br');
|
||||
for (const name of [
|
||||
'levels-db-index.json',
|
||||
'levels-db-index.json.br',
|
||||
'levels-database.json',
|
||||
'levels-database.json.br',
|
||||
]) {
|
||||
if (fs.existsSync(path.join(packDir, name))) items.push(name);
|
||||
}
|
||||
execSync(`cd "${packDir}" && zip -0 -q -r "${zipPath}" ${items.join(' ')}`, { stdio: 'pipe' });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user