1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-04-24 02:30:36 +08:00

release v0.0.1-alpha.0

This commit is contained in:
chu fan
2023-09-06 17:24:20 +08:00
parent c072b3d3a4
commit 87f125b850
5 changed files with 214 additions and 38 deletions

View File

@@ -5,16 +5,6 @@ process.env.PATH = `${join(cwd, 'node_modules', '.bin')}:${process.env.PATH}`
const {exec,exit} = require('shelljs');
async function printWithInterval() {
for (let count = 1; ; count++) {
if(count<5){
console.log('执行中'+'.'.repeat(count));
}else {
break;
}
}
}
@@ -63,9 +53,26 @@ exports.execShell = async commands => {
}
for (const command of runCommands) {
console.log(`=== command: >>> ${command} <<< start === `)
console.log(`>>>command:\n ${command} \n<<<start === \n`)
// await syncExec(command)
const {code}=await exec(command)
// 指令异常,不执行后续指令
if(code!==0){
break;
}
await syncExec(command)
console.log(`=== command: >>> ${command} <<< ending === `)
console.log(`<<<ending === `)
}
}
/**
* 脚本基础设置
* @type {{currentTime: string, errorLogger: string, successLogger: string, warnLogger: string}}
*/
exports.BaseSetting={
successLogger:"\033[36m",
errorLogger:"\033[1;31m",
warnLogger:"\033[1;33m",
// 定义时间
currentTime:'$(date "+%Y-%m-%d %H:%M:%S")'
}