🐛 Fix patch verification

This commit is contained in:
C-3PO 2018-09-14 05:15:58 +02:00
parent a59a6bd767
commit b984512a75
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -12,7 +12,7 @@ export default function verifyPatch(fileEntries: ISsnFileEntry[], product: Produ
//Check that last file is the .version file with diffType 0.
const lastFile = fileEntries[fileEntries.length - 1];
const validLastFileName = `${product}.version`;
const validLastFileAlternate = `Assets/assets_${product}_version.txt`;
const validLastFileAlternate = `Assets/${product}_version.txt`;
if (lastFile.name === validLastFileName) {
if (lastFile.diffType !== SsnDiffType.NewFile) {
throw new Error(`Last file (.version file) must have diffType 0 but it had diffType ${lastFile.diffType}.`);