From 49fab71c15c1c0150ee03fc6294be8e1795f93e6 Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Wed, 13 May 2020 20:28:06 +0200 Subject: [PATCH] allow version wildcard --- README.md | 2 +- asset_jenkins.js | 4 ++-- jenkins.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7def237..9cb48cd 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/asset_jenkins.js b/asset_jenkins.js index 665c98c..11f1e73 100644 --- a/asset_jenkins.js +++ b/asset_jenkins.js @@ -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) diff --git a/jenkins.js b/jenkins.js index 0cd1194..37c1969 100644 --- a/jenkins.js +++ b/jenkins.js @@ -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)