From 5e6b746ad7881046bac4b980a2d100e65d7dd0d5 Mon Sep 17 00:00:00 2001 From: pan <1029559041@qq.com> Date: Sat, 10 Oct 2020 02:53:15 +0800 Subject: [PATCH] init --- routes/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routes/index.js b/routes/index.js index acf8c62..7617373 100644 --- a/routes/index.js +++ b/routes/index.js @@ -23,14 +23,14 @@ function error(message){ //web钩子事件 //git@gogs.kirito.cool:panqihua/RiskCloudMock.git push事件 -router.post('/server', function(req, res, next) { +router.post('/deploy', function(req, res, next) { const updated_at=req.body.repository.updated_at - - info('调用自动部署命令') + const name=req.body.repository.name + info(`开始自动部署${name}`) const promise = new Promise((resolve, reject) => { - const spawnObj = spawn('updateRisk', ['RiskCloudMock'], {encoding: 'utf-8'}); + const spawnObj = spawn('updateRisk', [name], {encoding: 'utf-8'}); spawnObj.stdout.on('data', function(chunk) { info(chunk.toString()); });