File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ var buildDir = path.join(rootDir, '_build');
8888var branch = args [ 0 ] || 'master' ;
8989var pushBranches = [ branch ] ;
9090var npmTag = 'latest' ;
91+ var exitCode = 0 ;
9192
9293// the version to be released
9394var version ;
@@ -238,6 +239,7 @@ run('git config receive.denyCurrentBranch').then(
238239 } ) ;
239240} ) . then ( function ( ) {
240241 // Publish the package
242+ process . chdir ( 'dist' ) ;
241243 return run ( 'npm publish --tag ' + npmTag ) ;
242244} ) . then ( function ( ) {
243245 // Update the original repo with the new branch and tag pointers
@@ -247,18 +249,15 @@ run('git config receive.denyCurrentBranch').then(
247249 return run ( 'git push origin --tags' ) ;
248250 } ) ;
249251} ) . then ( function ( ) {
250- rl . close ( ) ;
251252 cleanup ( ) ;
252253 print ( '\nAll done! Yay!\n' ) ;
253254} ) . catch ( function ( error ) {
254- rl . close ( ) ;
255- if ( error . message === 'Aborted' ) {
256- cleanup ( ) ;
257- }
258- else {
255+ if ( error . message !== 'Aborted' ) {
259256 // Something broke -- display an error
260257 print ( error + '\n' ) ;
261258 print ( 'Aborted.\n' ) ;
262- process . exit ( 1 ) ;
259+ exitCode = 1 ;
263260 }
261+ } ) . then ( function ( ) {
262+ process . exit ( exitCode ) ;
264263} ) ;
You can’t perform that action at this time.
0 commit comments