Compare commits

..

No commits in common. "f89082563a5c101b34ed8554a498b8653b1bbe99" and "28fae0cf69d7672dca27907f15469ac1f336ffed" have entirely different histories.

37
ci.js
View File

@ -5,12 +5,12 @@
* Created by Timo Hocker <timo@scode.ovh>, May 2020
*/
/* eslint-disable no-console, no-process-exit, prefer-named-capture-group */
/* eslint-disable */
'use strict';
const fs = require ('fs');
const child_process = require ('child_process');
const { type } = require ('os');
const pkg = JSON.parse (fs.readFileSync ('package.json', 'utf-8'));
@ -25,40 +25,11 @@ if (typeof pkg.description === 'undefined' || pkg.description === '') {
ok = false;
}
if (typeof pkg.repository === 'object') {
if (pkg.repository.type !== 'git') {
console.log ('repository is not of type git');
ok = false;
}
if (!(/^https:\/\/.+\.git/iu).test (pkg.repository.url))
console.log ('repo url is not https.git');
}
else {
if (typeof pkg.repository === 'undefined') {
console.log ('repository undefined');
ok = false;
}
if (!(/^https:\/\/.+/iu).test (pkg.bugs)) {
console.log ('issue tracker url not defined');
ok = false;
}
if (typeof pkg.author === 'object') {
if (typeof pkg.author.name !== 'string') {
console.log ('author name undefined');
ok = false;
}
if (typeof pkg.author.email !== 'string') {
console.log ('author email undefined');
ok = false;
}
}
else {
console.log ('author not in object format');
ok = false;
}
function major (version) {
return version.replace (/\.[0-9x]+$/ui, '');
}
@ -92,7 +63,7 @@ if (fs.existsSync ('CHANGELOG.md')) {
}
else {
console.log ('changelog does not exist');
ok = false;
// ok = false; disable until all modules have a changelog
}
if (ok)