Skip to content

Commit

Permalink
💚 构建后处理多平台区分处理
Browse files Browse the repository at this point in the history
  • Loading branch information
hczs committed Oct 10, 2023
1 parent f4c0c96 commit 43408cc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions handle_pkg.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,13 @@ fs.readFile('./package.json', 'utf-8', (err, data) => {
let macSourceFile = commonPath + fileName + ".dmg";

// 复制文件
fs.copyFileSync(winSourceFile, targetPath + fileName + ".exe");
fs.copyFileSync(macSourceFile, targetPath + fileName + ".dmg");
if (fs.existsSync(winSourceFile)) {
fs.copyFileSync(winSourceFile, targetPath + fileName + ".exe");
}

if (fs.existsSync(macSourceFile)) {
fs.copyFileSync(macSourceFile, targetPath + fileName + ".dmg");
}
});


0 comments on commit 43408cc

Please sign in to comment.