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:
Devin Binnie
2024-03-12 10:04:11 -04:00
committed by GitHub
parent e5efa727fe
commit e56b5cdd6a
36 changed files with 921 additions and 3761 deletions

26
scripts/watch.js Normal file
View File

@@ -0,0 +1,26 @@
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
const electron = require('electron-connect').server.create({path: 'dist/'});
const webpack = require('webpack');
const mainConfig = require('../webpack.config.main.js');
const preloadConfig = require('../webpack.config.preload.js');
const rendererConfig = require('../webpack.config.renderer.js');
Promise.all([mainConfig, preloadConfig, rendererConfig].map((config) => {
return new Promise((resolve) => {
const compiler = webpack(config);
compiler.watch({}, (err, stats) => {
if (err) {
console.error(err);
}
process.stdout.write(stats.toString({colors: true}));
process.stdout.write('\n');
if (!stats.hasErrors()) {
electron.restart();
}
resolve();
});
});
})).then(() => electron.start());