Some further ESLint cleanup, remove some unnecessary scripts and lines (#2984)
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"rules": {
|
||||
"import/no-commonjs": 0
|
||||
}
|
||||
}
|
@@ -1,24 +0,0 @@
|
||||
// Copyright (c) 2015-2016 Yuya Ochiai
|
||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// This file uses process.exit().
|
||||
/* eslint-disable no-process-exit */
|
||||
|
||||
const {spawn} = require('child_process');
|
||||
|
||||
const {path7za} = require('7zip-bin');
|
||||
|
||||
const cwd = process.argv[2];
|
||||
|
||||
spawn(path7za, ['e', '-y', '*.zip'], {
|
||||
cwd,
|
||||
stdio: 'inherit',
|
||||
}).on('error', (err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}).on('close', (code) => {
|
||||
process.exit(code);
|
||||
});
|
||||
|
||||
/* eslint-enable no-process-exit */
|
@@ -1,33 +0,0 @@
|
||||
// Copyright (c) 2015-2016 Yuya Ochiai
|
||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
'use strict';
|
||||
|
||||
const spawnSync = require('child_process').spawnSync;
|
||||
const path = require('path');
|
||||
|
||||
const path7za = require('7zip-bin').path7za;
|
||||
|
||||
const pkg = require('../package.json');
|
||||
const appVersion = pkg.version;
|
||||
const name = pkg.name;
|
||||
|
||||
function disableInstallUpdate(zipPath) {
|
||||
const zipFullPath = path.resolve(__dirname, '..', zipPath);
|
||||
const appUpdaterConfigFile = 'app-updater-config.json';
|
||||
|
||||
const addResult = spawnSync(path7za, ['a', zipFullPath, appUpdaterConfigFile], {cwd: 'resources/windows'});
|
||||
if (addResult.status !== 0) {
|
||||
throw new Error(`7za a returned non-zero exit code for ${zipPath}`);
|
||||
}
|
||||
|
||||
const renameResult = spawnSync(path7za, ['rn', zipFullPath, appUpdaterConfigFile, `resources/${appUpdaterConfigFile}`]);
|
||||
if (renameResult.status !== 0) {
|
||||
throw new Error(`7za rn returned non-zero exit code for ${zipPath}`);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Manipulating 64-bit zip...');
|
||||
disableInstallUpdate(`release/${name}-${appVersion}-win-x64.zip`);
|
||||
console.log('Manipulating 32-bit zip...');
|
||||
disableInstallUpdate(`release/${name}-${appVersion}-win-ia32.zip`);
|
Reference in New Issue
Block a user