chore: 更新ci脚本 (#139)

* perf: replace ubuntu 20.04 with latest

* fix: Cannot handle 8-byte build ID

* perf: wxvpkg_pack 兼容windows
This commit is contained in:
msojocs 2025-04-24 13:54:58 +08:00 committed by GitHub
parent 70a2622fae
commit cb363c5326
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,6 @@
// https://gist.github.com/chemzqm/9f2334ca201dc2fbc363fdd757aa2ed4 // https://gist.github.com/chemzqm/9f2334ca201dc2fbc363fdd757aa2ed4
const path = require('path') const path = require('path')
const fs = require('fs') const fs = require('fs')
const { execSync } = require('child_process')
const args = process.argv.slice(2); const args = process.argv.slice(2);
const from = args[0] const from = args[0]
@ -12,7 +11,10 @@ const to = args[1]
let file = to let file = to
console.log(file) console.log(file)
if (fs.existsSync(file)) { if (fs.existsSync(file)) {
execSync(`rm -rf ${file}`) try{
fs.rmSync(file)
}
catch{}
} }
let fd = fs.openSync(file, 'w') let fd = fs.openSync(file, 'w')