fix: handle MainMenu.nib mismatch in Electron 18 (#42)

This commit is contained in:
Samuel Attard 2022-03-09 11:04:13 -08:00 коммит произвёл GitHub
Родитель 2c3c1a60a0
Коммит 479e80d6a9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -115,6 +115,11 @@ export const makeUniversalApp = async (opts: MakeUniversalOpts): Promise<void> =
const arm64Sha = await sha(path.resolve(opts.arm64AppPath, file.relativePath));
if (x64Sha !== arm64Sha) {
d('SHA for file', file.relativePath, `does not match across builds ${x64Sha}!=${arm64Sha}`);
// The MainMenu.nib files generated by Xcode13 are deterministic in effect but not deterministic in generated sequence
if (path.basename(path.dirname(file.relativePath)) === 'MainMenu.nib') {
// The mismatch here is OK so we just move on to the next one
continue;
}
throw new Error(
`Expected all non-binary files to have identical SHAs when creating a universal build but "${file.relativePath}" did not`,
);