Skip to content

Commit

Permalink
Cleanup /release/ before production build
Browse files Browse the repository at this point in the history
  • Loading branch information
victrme committed Apr 5, 2024
1 parent 4b07144 commit caba1bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ if (ENV_PROD && PLATFORMS.includes(platform)) {
}

if (ENV_PROD && platform === undefined) {
if (fs.existsSync('./release')) {
fs.rmSync('./release/', { recursive: true })
}

for (const platform of PLATFORMS) {
exec(`node ./build.config.js ${platform} prod`, (error, stdout, _) => {
error ? console.error(error) : console.log(`${stdout.replace('\n', '')} <- ${platform}`)
Expand Down

0 comments on commit caba1bb

Please sign in to comment.