require repository and issue tracker url
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
01dc0b4d4a
commit
f89082563a
16
ci.js
16
ci.js
@ -10,6 +10,7 @@
|
||||
|
||||
const fs = require ('fs');
|
||||
const child_process = require ('child_process');
|
||||
const { type } = require ('os');
|
||||
|
||||
const pkg = JSON.parse (fs.readFileSync ('package.json', 'utf-8'));
|
||||
|
||||
@ -24,11 +25,24 @@ if (typeof pkg.description === 'undefined' || pkg.description === '') {
|
||||
ok = false;
|
||||
}
|
||||
|
||||
if (typeof pkg.repository === 'undefined') {
|
||||
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 {
|
||||
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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user