Various build and developer fixes, some optimizations (#2975)
* Various build and developer fixes, some optimizations * Fix the linux build * Fix afterpack * Fix notarization variables * Revert macos-notification-state changes from this PR * Only build the tar for PRs * Also ci * Fix copy script * Fix copy script more * Remove @babel/cli * Fix windows build * Fix MAS build
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
const {spawnSync} = require('child_process');
|
||||
const path = require('path');
|
||||
|
||||
const {flipFuses, FuseVersion, FuseV1Options} = require('@electron/fuses');
|
||||
const {spawn} = require('@electron/notarize/lib/spawn.js');
|
||||
|
||||
const SETUID_PERMISSIONS = '4755';
|
||||
|
||||
function fixSetuid(context) {
|
||||
return async (target) => {
|
||||
if (!['appimage', 'snap'].includes(target.name.toLowerCase())) {
|
||||
const result = await spawn('chmod', [SETUID_PERMISSIONS, path.join(context.appOutDir, 'chrome-sandbox')]);
|
||||
if (result.code !== 0) {
|
||||
const result = await spawnSync('chmod', [SETUID_PERMISSIONS, path.join(context.appOutDir, 'chrome-sandbox')]);
|
||||
if (result.error) {
|
||||
throw new Error(
|
||||
`Failed to set proper permissions for linux arch on ${target.name}`,
|
||||
`Failed to set proper permissions for linux arch on ${target.name}: ${result.error} ${result.stderr} ${result.stdout}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user