|
@@ -35,7 +35,7 @@ function connectSSh() {
|
35
|
35
|
function runTask() {
|
36
|
36
|
//打包完成
|
37
|
37
|
console.log(`当前NodeJs版本是${process.version}`);
|
38
|
|
- const isNodeVersionLt17 = parseInt(process.version) < 17;
|
|
38
|
+ const isNodeVersionLt17 = parseInt(process.version.slice(1)) < 17;
|
39
|
39
|
const execStr = isNodeVersionLt17 ? 'npm run build' : 'npm run build:17';
|
40
|
40
|
if (shell.exec(execStr).code == 0) {
|
41
|
41
|
// if (shell.exec(`find dist -name '*.js' -print0 | xargs -0 gzip -k`).code == 0) {
|