-
-
Notifications
You must be signed in to change notification settings - Fork 100
/
now.js
42 lines (34 loc) · 806 Bytes
/
now.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const { spawn } = require('child_process')
function nowDeploy( context ) {
const now = spawn('npx', [
'now',
'-m',
'githubCommitAuthorName=Minsu Lee',
'-m',
'githubCommitAuthorLogin=amondnet',
'-m',
'githubDeployment=1',
'-m',
'githubOrg=amondnet',
'-m',
'githubRepo=test',
'-m',
'githubCommitOrg=amondnet',
'-m',
'githubCommitRepo=test',
'-m',
'githubCommitSha=48615ece0acfbe87682bbb64d7b87b75db32b60e',
'-m',
'githubCommitMessage=test'])
now.stdout.on('data', (data) => {
console.log(`stdout': ${data}`)
})
now.stderr.on(`data`, (data) => {
console.error(`stderr: ${data}`)
})
now.on('close', (code) => {
if (code === 0) {
console.log(`child process exited with code ${code}`)
}
})
}