File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 44
55const chalk = require ( 'chalk' ) ;
66const http = require ( 'request-promise-json' ) ;
7+ const logUpdate = require ( 'log-update' ) ;
8+ const prompt = require ( 'prompt-promise' ) ;
79const { execRead, logPromise} = require ( '../utils' ) ;
810
911// https://circleci.com/docs/api/v1-reference/#projects
@@ -46,5 +48,21 @@ module.exports = async params => {
4648 if ( params . local ) {
4749 return ;
4850 }
51+
52+ if ( params . skipCI ) {
53+ logUpdate ( chalk . red `Are you sure you want to skip CI? (y for yes, n for no)` ) ;
54+ const confirm = await prompt ( '' ) ;
55+ logUpdate . done ( ) ;
56+ if ( confirm === 'y' ) {
57+ return ;
58+ } else {
59+ throw Error (
60+ chalk `
61+ Cancelling release.
62+ `
63+ ) ;
64+ }
65+ }
66+
4967 return logPromise ( check ( params ) , 'Checking CircleCI status' ) ;
5068} ;
Original file line number Diff line number Diff line change @@ -21,6 +21,6 @@ module.exports = async params => {
2121 update ( params ) ,
2222 `Updating checkout ${ chalk . yellow . bold (
2323 params . cwd
24- ) } on branch ${ chalk . yellow . bold ( params . branch ) } } `
24+ ) } on branch ${ chalk . yellow . bold ( params . branch ) } `
2525 ) ;
2626} ;
Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ const paramDefinitions = [
4343 'The npm dist tag; defaults to [bold]{latest} for a stable' +
4444 'release, [bold]{next} for unstable' ,
4545 } ,
46+ {
47+ name : 'skipCI' ,
48+ type : Boolean ,
49+ description :
50+ 'Skip Circle CI status check (requires confirmation)' ,
51+ } ,
4652] ;
4753
4854module . exports = {
You can’t perform that action at this time.
0 commit comments