ensure up to date readme
This commit is contained in:
parent
86aa9103ac
commit
1bd7125c84
@ -25,12 +25,16 @@ child_process.execSync ('yarn lint', { stdio: 'inherit' });
|
||||
child_process.execSync ('yarn test', { stdio: 'inherit' });
|
||||
child_process.execSync ('yarn compile', { stdio: 'inherit' });
|
||||
|
||||
child_process.exec ('git log -1 | grep \\'\\\\[no publish\\\\]\\'')
|
||||
.addListener ('exit', (code) => {
|
||||
if (code === 0) {
|
||||
console.log ('build not marked for deployment');
|
||||
process.exit (1);
|
||||
}
|
||||
else { child_process.execSync ('yarn publish --access public'); }
|
||||
});
|
||||
if (fs.existsSync ('README.md')) {
|
||||
const readme = fs.readFileSync ('README.md', 'utf-8');
|
||||
// eslint-disable-next-line prefer-named-capture-group
|
||||
const version = (/version: ([0-9.]+)/ui).exec (readme);
|
||||
if (
|
||||
typeof version === 'undefined'
|
||||
|| version[1] !== pkg.version
|
||||
)
|
||||
console.log ('readme version does not match package version');
|
||||
else
|
||||
child_process.execSync ('yarn publish --access public');
|
||||
}
|
||||
`;
|
||||
|
21
jenkins.js
21
jenkins.js
@ -16,12 +16,15 @@ child_process.execSync ('yarn lint', { stdio: 'inherit' });
|
||||
child_process.execSync ('yarn test', { stdio: 'inherit' });
|
||||
child_process.execSync ('yarn compile', { stdio: 'inherit' });
|
||||
|
||||
child_process.exec ('git log -1 | grep \'\\[no publish\\]\'')
|
||||
.addListener ('exit', (code) => {
|
||||
if (code === 0) {
|
||||
console.log ('build not marked for deployment');
|
||||
process.exit (1);
|
||||
}
|
||||
else { child_process.execSync ('yarn publish --access public'); }
|
||||
});
|
||||
|
||||
if (fs.existsSync ('README.md')) {
|
||||
const readme = fs.readFileSync ('README.md', 'utf-8');
|
||||
// eslint-disable-next-line prefer-named-capture-group
|
||||
const version = (/version: ([0-9.]+)/ui).exec (readme);
|
||||
if (
|
||||
typeof version === 'undefined'
|
||||
|| version[1] !== pkg.version
|
||||
)
|
||||
console.log ('readme version does not match package version');
|
||||
else
|
||||
child_process.execSync ('yarn publish --access public');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user