ci(after-build): move renameFilesWithSpaces call to the end of the process

This commit is contained in:
kangfenmao 2025-04-14 18:42:18 +08:00
parent 833873b95e
commit f372ebe485

View File

@ -23,9 +23,6 @@ async function afterBuild() {
console.log('[After build] hook started...') console.log('[After build] hook started...')
try { try {
// First rename files with spaces
await renameFilesWithSpaces()
// Read the latest.yml file // Read the latest.yml file
const latestYmlPath = path.join('dist', 'latest.yml') const latestYmlPath = path.join('dist', 'latest.yml')
const yamlContent = fs.readFileSync(latestYmlPath, 'utf8') const yamlContent = fs.readFileSync(latestYmlPath, 'utf8')
@ -62,6 +59,9 @@ async function afterBuild() {
fs.writeFileSync(latestYmlPath, newYamlContent, 'utf8') fs.writeFileSync(latestYmlPath, newYamlContent, 'utf8')
// Rename files with spaces
await renameFilesWithSpaces()
console.log('Successfully cleaned up latest.yml data') console.log('Successfully cleaned up latest.yml data')
} catch (error) { } catch (error) {
console.error('Error processing latest.yml:', error) console.error('Error processing latest.yml:', error)