diff --git a/asset_jenkins.js b/asset_jenkins.js index 7049470..4ada885 100644 --- a/asset_jenkins.js +++ b/asset_jenkins.js @@ -40,7 +40,7 @@ if (fs.existsSync ('README.md')) { // eslint-disable-next-line prefer-named-capture-group const version = (/version: ([0-9.]+)/ui).exec (readme); if ( - typeof version === 'undefined' + version === null || version[1] !== pkg.version ) { console.log ('readme version does not match package version'); diff --git a/jenkins.js b/jenkins.js index 041edf6..031f8d8 100644 --- a/jenkins.js +++ b/jenkins.js @@ -31,7 +31,7 @@ if (fs.existsSync ('README.md')) { // eslint-disable-next-line prefer-named-capture-group const version = (/version: ([0-9.]+)/ui).exec (readme); if ( - typeof version === 'undefined' + version === null || version[1] !== pkg.version ) { console.log ('readme version does not match package version');