update jenkins.js
This commit is contained in:
parent
18f8739fd7
commit
2d943894c1
11
jenkins.js
11
jenkins.js
@ -1,10 +1,3 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) Sapphirecode - All Rights Reserved
|
|
||||||
* This file is part of utilities which is released under MIT.
|
|
||||||
* See file 'LICENSE' for full license details.
|
|
||||||
* Created by Timo Hocker <timo@scode.ovh>, May 2020
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -33,12 +26,12 @@ if (typeof pkg.repository === 'undefined') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function major (version) {
|
function major (version) {
|
||||||
return version.replace (/\.[0-9]+$/ui, '');
|
return version.replace (/\.[0-9x]+$/ui, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
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');
|
||||||
const version = (/version: ([0-9.]+)/ui).exec (readme);
|
const version = (/version: ([0-9x.]+)/ui).exec (readme);
|
||||||
if (
|
if (
|
||||||
version === null
|
version === null
|
||||||
|| major (version[1]) !== major (pkg.version)
|
|| major (version[1]) !== major (pkg.version)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user