🐛 Fix check for announce URL

This commit is contained in:
C-3PO 2018-06-23 22:18:26 +02:00
parent 3ee23f6445
commit 968e581d70
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -5,7 +5,7 @@ export default function verifySolidpkg(file: ISolid, { product, from, to }: {pro
if (typeof file['creation date'] !== 'number') { if (typeof file['creation date'] !== 'number') {
throw new Error(`Expected creation date to be a number but it was "${file['creation date']}".`); throw new Error(`Expected creation date to be a number but it was "${file['creation date']}".`);
} }
if (file.announce !== 'http://Tracker22.fda5b1cf-eac6-402b-9ebf-17bc381314aa.automated.ssntracker.int:80/') { if (file.announce.match(/^http:\/\/Tracker22\.[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}\.automated\.(tel\.swtor\.com|ssntracker\.int):80\/$/) === null) {
throw new Error(`Expected announce URL but it was "${file.announce}".`); throw new Error(`Expected announce URL but it was "${file.announce}".`);
} }
if (file.title !== `${product}: ${from}to${to}`) { if (file.title !== `${product}: ${from}to${to}`) {