[no publish] do not increment version if build failed

This commit is contained in:
Timo Hocker 2020-02-06 12:10:32 +01:00
parent e67d76029e
commit 03c879b073

View File

@ -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');
});