🐛 Add bugged release paths from assets_swtor_test_main
This commit is contained in:
parent
bddaef0373
commit
1486384207
1 changed files with 11 additions and 2 deletions
|
@ -156,9 +156,18 @@ export default function verifyPatchmanifest(manifestFile: xmlJs.Element, product
|
||||||
if (ExtraData.type !== 'element' || ExtraData.name !== 'ExtraData' || ExtraData.attributes !== undefined) {
|
if (ExtraData.type !== 'element' || ExtraData.name !== 'ExtraData' || ExtraData.attributes !== undefined) {
|
||||||
throw new Error(`Expected ExtraData element in patch ${fromNum}to${toNum}.`);
|
throw new Error(`Expected ExtraData element in patch ${fromNum}to${toNum}.`);
|
||||||
}
|
}
|
||||||
const isPatchWithoutExtraData = product === 'assets_swtor_fr_fr' && fromNum === '132' && toNum === '130';
|
const noExtraData: Array<[Product, number, number]> = [
|
||||||
|
['assets_swtor_fr_fr', 132, 130],
|
||||||
|
['assets_swtor_test_main', 261, 262],
|
||||||
|
['assets_swtor_test_main', 0, 262],
|
||||||
|
['assets_swtor_test_main', 262, 260],
|
||||||
|
];
|
||||||
|
const isPatchWithoutExtraData = noExtraData.some((entry) => product === entry[0] && fromNum === String(entry[1]) && toNum === String(entry[2]));
|
||||||
if (ExtraData.elements === undefined && !isPatchWithoutExtraData) {
|
if (ExtraData.elements === undefined && !isPatchWithoutExtraData) {
|
||||||
throw new Error(`Expected ExtraData element with children in patch ${fromNum}to${toNum}.`);
|
throw new Error(`Expected ExtraData element with children in patch ${fromNum}to${toNum} but it had no children.`);
|
||||||
|
}
|
||||||
|
if (ExtraData.elements !== undefined && isPatchWithoutExtraData) {
|
||||||
|
throw new Error(`Expected ExtraData element without children in patch ${fromNum}to${toNum} but it had children.`);
|
||||||
}
|
}
|
||||||
if (!isPatchWithoutExtraData) {
|
if (!isPatchWithoutExtraData) {
|
||||||
for (const ExtraDataItem of (ExtraData.elements as xmlJs.Element[])) {
|
for (const ExtraDataItem of (ExtraData.elements as xmlJs.Element[])) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue