[no publish] do not increment version if build failed
This commit is contained in:
parent
e67d76029e
commit
03c879b073
@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-process-exit */
|
||||
/* eslint-disable no-console */
|
||||
/* eslint-disable no-sync */
|
||||
'use strict';
|
||||
@ -16,8 +17,10 @@ child_process.execSync ('yarn test', { stdio: 'inherit' });
|
||||
|
||||
child_process.exec ('git log -1 | grep \'\\[no publish\\]\'')
|
||||
.addListener ('exit', (code) => {
|
||||
if (code === 0)
|
||||
if (code === 0) {
|
||||
console.log ('build not marked for deployment');
|
||||
process.exit (1);
|
||||
}
|
||||
else
|
||||
child_process.execSync ('yarn publish');
|
||||
});
|
||||
|
Reference in New Issue
Block a user