[MM-44344] Restore zip build for Windows and remove auto-updater from it (#2132)
This commit is contained in:
25
scripts/afterbuild.js
Normal file
25
scripts/afterbuild.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
const {spawnSync} = require('child_process');
|
||||
|
||||
const {path7za} = require('7zip-bin');
|
||||
|
||||
const windowsZipRegex = /win-[A-Za-z0-9]+\.zip$/g;
|
||||
|
||||
async function removeAppUpdate(path) {
|
||||
const result = await spawnSync(path7za, ['d', path, 'resources/app-update.yml', '-r']);
|
||||
if (result.error) {
|
||||
throw new Error(
|
||||
`Failed to remove files from ${path}: ${result.error} ${result.stderr} ${result.stdout}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
exports.default = async function afterAllArtifactBuild(context) {
|
||||
await context.artifactPaths.forEach(async (path) => {
|
||||
if (path.match(windowsZipRegex)) {
|
||||
await removeAppUpdate(path);
|
||||
}
|
||||
});
|
||||
};
|
@@ -28,6 +28,10 @@ $(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-x86.msi")
|
||||
#### Windows - setup exe files
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-setup-${VERSION}-win.exe")
|
||||
|
||||
#### Windows - zip files
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-win32.zip")
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-win64.zip")
|
||||
|
||||
#### Mac
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-mac-universal.dmg")
|
||||
$(print_link "${BASE_URL}/mattermost-desktop-${VERSION}-mac-x64.dmg")
|
||||
|
Reference in New Issue
Block a user