log with current time

This commit is contained in:
陆柯 2023-03-19 16:07:00 +08:00
parent d07de056e7
commit 36cc26a41f

View File

@ -204,12 +204,14 @@ function deployToSsh (connection) {
ssh.dispose()
if (err) {
console.error(
`🤷‍♀️🤷‍♀️🤷‍♀️ Failed deploy ${envarDeploy.fromPath} to ${connection.targetPath}/${connection.targetFolder} 🤷‍♀️🤷‍♀️🤷‍♀️`
new Date(),
`❌❌❌ Failed deploy ${envarDeploy.fromPath} to ${connection.targetPath}/${connection.targetFolder} ❌❌❌`
)
process.exit(1)
} else {
console.info(
`😊😊😊 Successfully deployed [${envarDeploy.fromPath}] to [${connection.targetPath}/${connection.targetFolder}] 😊😊😊`
new Date(),
`✅✅✅ Successfully deployed [${envarDeploy.fromPath}] to [${connection.targetPath}/${connection.targetFolder}] ✅✅✅`
)
if (connection.url) {
console.info(`😊😊😊 ${connection.url} 😊😊😊`)
@ -221,7 +223,8 @@ function deployToSsh (connection) {
console.error(err)
ssh.dispose()
console.error(
`🤷‍♀️🤷‍♀️🤷‍♀️ Failed deploy [${envarDeploy.fromPath}] to [${connection.targetPath}/${connection.targetFolder}] 🤷‍♀️🤷‍♀️🤷‍♀️`
new Date(),
`❌❌❌ Failed deploy [${envarDeploy.fromPath}] to [${connection.targetPath}/${connection.targetFolder}] ❌`
)
process.exit(1)
})
@ -370,7 +373,8 @@ function deployToGit (connection) {
})
.then(() => {
console.info(
`😊😊😊 Successfully deployed [${envarDeploy.fromPath}] to [${connection.repo}#${connection.branch}] 😊😊😊`
new Date(),
`✅✅✅ Successfully deployed [${envarDeploy.fromPath}] to [${connection.repo}#${connection.branch}] ✅✅✅`
)
if (connection.url) {
console.info(`😊😊😊 ${connection.url} 😊😊😊`)
@ -378,7 +382,8 @@ function deployToGit (connection) {
})
.catch(err => {
console.error(
`🤷‍♀️🤷‍♀️🤷‍♀️ Failed deploy [${envarDeploy.fromPath}] to [${connection.repo}#${connection.branch}] 🤷‍♀️🤷‍♀️🤷‍♀️`
new Date(),
`❌❌❌ Failed deploy [${envarDeploy.fromPath}] to [${connection.repo}#${connection.branch}] ❌❌❌`
)
process.exit(1)
})