You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 9, 2021. It is now read-only.
`### New Δ Now ${context} deployment complete\n- ✅ **Build Passed**\n- 🚀 **URL** : ${url}\n---\nNote: **This is autogenerated through travis-ci build**`;
@@ -99,20 +107,19 @@ function deploy(context, sha) {
99
107
);
100
108
axios
101
109
.post(discordHook,{
102
-
content: `Δ Now ${context} deployment failed. See Travis logs for details.`,
110
+
content: `Δ Now ${context} deployment failed. See Travis logs for details. Reason: \n \`\`\`${err}\`\`\``,
103
111
username: 'coderplex-bot',
104
112
})
105
113
.then(()=>{
106
-
console.log(`SUCCESS posted to discord`);
114
+
console.log(`Error posted to discord`);
107
115
})
108
116
.catch(console.log);
109
117
});
110
118
111
119
child.on('close',()=>{
112
120
consttarget_url=getUrl(stdout);
113
-
constcomment=url=>
114
-
`### New Δ Now ${context} deployment complete\n- ✅ **Build Passed**\n- 🚀 **URL** : ${url}\n---\nNote: **This is autogenerated through travis-ci build**`;
115
121
if(alias){
122
+
console.log(`Alising ${target_url} to ${alias}`);
116
123
constargs=[
117
124
'alias',
118
125
'--token',
@@ -123,22 +130,42 @@ function deploy(context, sha) {
123
130
target_url,
124
131
alias,
125
132
];
126
-
spawn(nowCli,args);
127
-
axios
128
-
.post(discordHook,{
129
-
content: comment(`${alias} and https://coderplex.org`),
130
-
username: 'coderplex-bot',
131
-
})
132
-
.then(()=>{
133
-
console.log(`SUCCESS posted to discord`);
134
-
})
135
-
.catch(console.log);
133
+
constsubChild=spawn(nowCli,args);
134
+
subChild.stdout.on('data',data=>{
135
+
console.log(data);
136
+
});
137
+
subChild.on('error',err=>{
138
+
console.log(err);
139
+
axios
140
+
.post(discordHook,{
141
+
content: `Aliasing ${target_url} to ${alias} failed. Reason: \n \`\`\`${err}\`\`\``,
0 commit comments