allow version wildcard
This commit is contained in:
parent
7b46234832
commit
49fab71c15
@ -2,7 +2,7 @@
|
||||
|
||||
[![Package quality](https://packagequality.com/badge/%40sapphirecode%2Fstandard)](https://packagequality.com/#?package=%40sapphirecode%2Fstandard)
|
||||
|
||||
version: 1.0.18
|
||||
version: 1.0.x
|
||||
|
||||
standard files and scripts for sapphirecode modules
|
||||
|
||||
|
@ -35,12 +35,12 @@ if (typeof pkg.repository === 'undefined') {
|
||||
}
|
||||
|
||||
function major (version) {
|
||||
return version.replace (/\\.[0-9]+$/ui, '');
|
||||
return version.replace (/\\.[0-9x]+$/ui, '');
|
||||
}
|
||||
|
||||
if (fs.existsSync ('README.md')) {
|
||||
const readme = fs.readFileSync ('README.md', 'utf-8');
|
||||
const version = (/version: ([0-9.]+)/ui).exec (readme);
|
||||
const version = (/version: ([0-9x.]+)/ui).exec (readme);
|
||||
if (
|
||||
version === null
|
||||
|| major (version[1]) !== major (pkg.version)
|
||||
|
@ -26,12 +26,12 @@ if (typeof pkg.repository === 'undefined') {
|
||||
}
|
||||
|
||||
function major (version) {
|
||||
return version.replace (/\.[0-9]+$/ui, '');
|
||||
return version.replace (/\.[0-9x]+$/ui, '');
|
||||
}
|
||||
|
||||
if (fs.existsSync ('README.md')) {
|
||||
const readme = fs.readFileSync ('README.md', 'utf-8');
|
||||
const version = (/version: ([0-9.]+)/ui).exec (readme);
|
||||
const version = (/version: ([0-9x.]+)/ui).exec (readme);
|
||||
if (
|
||||
version === null
|
||||
|| major (version[1]) !== major (pkg.version)
|
||||
|
Loading…
x
Reference in New Issue
Block a user