Fix macos-notification-state build issue (#2310)

* Fix macos-notification-state build issue

* Fix windows build, a bit of cleanup
This commit is contained in:
Devin Binnie
2022-10-24 10:43:45 -04:00
committed by GitHub
parent 33da0afce5
commit 83b6c64cf3
7 changed files with 1861 additions and 50 deletions

View File

@@ -1,34 +0,0 @@
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
const {exec} = require('child_process');
exports.default = async function beforePack(context) {
return new Promise((resolve, reject) => {
const arch = getArch(context.arch);
exec(`npm run postinstall -- --arch ${arch}`, (error) => {
if (error) {
reject(error);
} else {
resolve();
}
});
});
};
function getArch(arch) {
switch (arch) {
case 0:
return 'ia32';
case 1:
return 'x64';
case 2:
return 'armv7l';
case 3:
return 'arm64';
case 4:
return 'universal';
default:
return '';
}
}