chore: fix mas build

This commit is contained in:
DIYgod 2025-03-28 14:54:07 +08:00
parent 11b1023bea
commit 9a2c32a79e
No known key found for this signature in database
1 changed files with 13 additions and 11 deletions

View File

@ -283,19 +283,21 @@ const config: ForgeConfig = {
})
yml.releaseDate = new Date().toISOString()
const ymlPath = path.join(basePath, ymlMapsMap[makeResults[0]?.platform!])
if (makeResults[0]?.platform && ymlMapsMap[makeResults[0].platform] && basePath) {
const ymlPath = path.join(basePath, ymlMapsMap[makeResults[0].platform])
const ymlStr = yaml.dump(yml, {
lineWidth: -1,
})
fs.writeFileSync(ymlPath, ymlStr)
const ymlStr = yaml.dump(yml, {
lineWidth: -1,
})
fs.writeFileSync(ymlPath, ymlStr)
makeResults.push({
artifacts: [ymlPath],
platform: makeResults[0]!.platform,
arch: makeResults[0]!.arch,
packageJSON: makeResults[0]!.packageJSON,
})
makeResults.push({
artifacts: [ymlPath],
platform: makeResults[0]!.platform,
arch: makeResults[0]!.arch,
packageJSON: makeResults[0]!.packageJSON,
})
}
return makeResults
},