require repository and description
This commit is contained in:
parent
1bd7125c84
commit
63a459b1db
@ -25,6 +25,16 @@ child_process.execSync ('yarn lint', { stdio: 'inherit' });
|
|||||||
child_process.execSync ('yarn test', { stdio: 'inherit' });
|
child_process.execSync ('yarn test', { stdio: 'inherit' });
|
||||||
child_process.execSync ('yarn compile', { stdio: 'inherit' });
|
child_process.execSync ('yarn compile', { stdio: 'inherit' });
|
||||||
|
|
||||||
|
if (typeof pkg.description === 'undefined' || pkg.description === '') {
|
||||||
|
console.log ('description undefined');
|
||||||
|
process.exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof pkg.repository === 'undefined') {
|
||||||
|
console.log ('repository undefined');
|
||||||
|
process.exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
if (fs.existsSync ('README.md')) {
|
if (fs.existsSync ('README.md')) {
|
||||||
const readme = fs.readFileSync ('README.md', 'utf-8');
|
const readme = fs.readFileSync ('README.md', 'utf-8');
|
||||||
// eslint-disable-next-line prefer-named-capture-group
|
// eslint-disable-next-line prefer-named-capture-group
|
||||||
@ -32,9 +42,10 @@ if (fs.existsSync ('README.md')) {
|
|||||||
if (
|
if (
|
||||||
typeof version === 'undefined'
|
typeof version === 'undefined'
|
||||||
|| version[1] !== pkg.version
|
|| version[1] !== pkg.version
|
||||||
)
|
) {
|
||||||
console.log ('readme version does not match package version');
|
console.log ('readme version does not match package version');
|
||||||
else
|
process.exit (1);
|
||||||
child_process.execSync ('yarn publish --access public');
|
}
|
||||||
|
else { child_process.execSync ('yarn publish --access public'); }
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
17
jenkins.js
17
jenkins.js
@ -16,6 +16,16 @@ child_process.execSync ('yarn lint', { stdio: 'inherit' });
|
|||||||
child_process.execSync ('yarn test', { stdio: 'inherit' });
|
child_process.execSync ('yarn test', { stdio: 'inherit' });
|
||||||
child_process.execSync ('yarn compile', { stdio: 'inherit' });
|
child_process.execSync ('yarn compile', { stdio: 'inherit' });
|
||||||
|
|
||||||
|
if (typeof pkg.description === 'undefined' || pkg.description === '') {
|
||||||
|
console.log ('description undefined');
|
||||||
|
process.exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof pkg.repository === 'undefined') {
|
||||||
|
console.log ('repository undefined');
|
||||||
|
process.exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
if (fs.existsSync ('README.md')) {
|
if (fs.existsSync ('README.md')) {
|
||||||
const readme = fs.readFileSync ('README.md', 'utf-8');
|
const readme = fs.readFileSync ('README.md', 'utf-8');
|
||||||
// eslint-disable-next-line prefer-named-capture-group
|
// eslint-disable-next-line prefer-named-capture-group
|
||||||
@ -23,8 +33,9 @@ if (fs.existsSync ('README.md')) {
|
|||||||
if (
|
if (
|
||||||
typeof version === 'undefined'
|
typeof version === 'undefined'
|
||||||
|| version[1] !== pkg.version
|
|| version[1] !== pkg.version
|
||||||
)
|
) {
|
||||||
console.log ('readme version does not match package version');
|
console.log ('readme version does not match package version');
|
||||||
else
|
process.exit (1);
|
||||||
child_process.execSync ('yarn publish --access public');
|
}
|
||||||
|
else { child_process.execSync ('yarn publish --access public'); }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user