✔ Check for only full files in release from -1
This commit is contained in:
parent
8f5547222c
commit
16fb98e1aa
1 changed files with 7 additions and 1 deletions
|
@ -14,7 +14,13 @@ export default async function getPatch(product: Product, from: number, to: numbe
|
||||||
|
|
||||||
const fileEntries = readSsnFile(zipFile);
|
const fileEntries = readSsnFile(zipFile);
|
||||||
|
|
||||||
//TODO: verify file entries
|
//Verify file entries
|
||||||
|
if (from === -1) {
|
||||||
|
fileEntries.filter((file) => file.diffType !== SsnDiffType.NewFile).forEach((file) => {
|
||||||
|
throw new Error(`Patches from -1 must be included in full, but this patch had a file "${file.name}" with diff type ${file.diffType}.`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//TODO: last file must always be `${product}.version` with diff type. Other files depend on diffType.
|
||||||
console.log(fileEntries);
|
console.log(fileEntries);
|
||||||
|
|
||||||
//Extract newly added files
|
//Extract newly added files
|
||||||
|
|
Loading…
Add table
Reference in a new issue