File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ checkToken()
14
14
. then ( createRelease )
15
15
. then ( uploadAssets )
16
16
. then ( publishRelease )
17
+ . then ( deployToHeroku )
17
18
. catch ( ( error ) => {
18
19
console . error ( error . message || error )
19
20
process . exit ( 1 )
@@ -168,8 +169,30 @@ function publishRelease (release) {
168
169
return reject ( Error ( `Non-200 response: ${ response . statusCode } \n${ util . inspect ( body ) } ` ) )
169
170
}
170
171
171
- console . log ( body . html_url )
172
172
resolve ( body )
173
173
} )
174
174
} )
175
175
}
176
+
177
+
178
+ function deployToHeroku ( ) {
179
+ return new Promise ( ( resolve , reject ) => {
180
+ console . log ( 'Deploying to heroku' )
181
+
182
+ const herokuCommand = [
183
+ 'heroku' ,
184
+ 'config:set' ,
185
+ '-a' ,
186
+ 'github-electron-api-demos' ,
187
+ `ELECTRON_LATEST_RELEASE=${ version } `
188
+ ] . join ( ' ' )
189
+
190
+ childProcess . exec ( herokuCommand , ( error ) => {
191
+ if ( error ) {
192
+ reject ( error )
193
+ } else {
194
+ resolve ( )
195
+ }
196
+ } )
197
+ } )
198
+ }
You can’t perform that action at this time.
0 commit comments