更新部署服务

This commit is contained in:
aixianling
2022-05-26 18:13:54 +08:00
parent 54c631f208
commit 06a9b238e7
3 changed files with 4 additions and 5 deletions

View File

@@ -4,9 +4,8 @@ module.exports = info => {
return new Promise((resolve, reject) => {
fse.emptyDir(`zips/${info.id}`, err => {
if (!err) {
execute(`cd zips&&git clone ${info.git} ./${info.id}`)
.then(() => execute(`cd zips/${info.id}&&git checkout ${info.branch}`))
.then(() => execute(`cd zips/${info.id}&&npm i&&npm run build`))
execute(`./${info.updateShell}`)
.then(() => execute(`./${info.libShell}`))
.then(() => resolve())
.catch(errs => {
console.log(errs)