2022-06-14 14:37:10 +08:00
|
|
|
/*---------------------------------------------------------------------------------------------
|
|
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const gulp = require('gulp');
|
|
|
|
const replace = require('gulp-replace');
|
|
|
|
const rename = require('gulp-rename');
|
|
|
|
const shell = require('gulp-shell');
|
|
|
|
const es = require('event-stream');
|
|
|
|
const vfs = require('vinyl-fs');
|
|
|
|
const util = require('./lib/util');
|
2024-04-30 20:57:13 +08:00
|
|
|
const { getVersion } = require('./lib/getVersion');
|
2022-06-14 14:37:10 +08:00
|
|
|
const task = require('./lib/task');
|
|
|
|
const packageJson = require('../package.json');
|
|
|
|
const product = require('../product.json');
|
2024-04-30 20:57:13 +08:00
|
|
|
const dependenciesGenerator = require('./linux/dependencies-generator');
|
2023-11-24 14:27:51 +08:00
|
|
|
const sysrootInstaller = require('./linux/debian/install-sysroot');
|
|
|
|
const debianRecommendedDependencies = require('./linux/debian/dep-lists').recommendedDeps;
|
2022-06-14 14:37:10 +08:00
|
|
|
const path = require('path');
|
|
|
|
const root = path.dirname(__dirname);
|
2024-04-30 20:57:13 +08:00
|
|
|
const commit = getVersion(root);
|
2022-06-14 14:37:10 +08:00
|
|
|
|
2024-03-14 19:11:52 +08:00
|
|
|
// const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);
|
2022-06-14 14:37:10 +08:00
|
|
|
|
2024-04-30 20:57:13 +08:00
|
|
|
/**
|
|
|
|
* @param {string} arch
|
|
|
|
*/
|
2022-06-14 14:37:10 +08:00
|
|
|
function getDebPackageArch(arch) {
|
|
|
|
return { x64: 'amd64', armhf: 'armhf', arm64: 'arm64' }[arch];
|
|
|
|
}
|
|
|
|
|
|
|
|
function prepareDebPackage(arch) {
|
|
|
|
const binaryDir = '../VSCode-linux-' + arch;
|
|
|
|
const debArch = getDebPackageArch(arch);
|
|
|
|
const destination = '.build/linux/deb/' + debArch + '/' + product.applicationName + '-' + debArch;
|
|
|
|
|
|
|
|
return function () {
|
|
|
|
const desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/applications/' + product.applicationName + '.desktop'));
|
|
|
|
|
|
|
|
const desktopUrlHandler = gulp.src('resources/linux/code-url-handler.desktop', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/applications/' + product.applicationName + '-url-handler.desktop'));
|
|
|
|
|
|
|
|
const desktops = es.merge(desktop, desktopUrlHandler)
|
2023-05-30 15:53:59 +08:00
|
|
|
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
|
|
|
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
2022-06-14 14:37:10 +08:00
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
2024-05-10 15:40:21 +08:00
|
|
|
.pipe(replace('@@EXEC@@', `/opt/apps/${product.applicationName}/${product.applicationName}`))
|
2022-06-14 14:37:10 +08:00
|
|
|
.pipe(replace('@@ICON@@', product.linuxIconName))
|
|
|
|
.pipe(replace('@@URLPROTOCOL@@', product.urlProtocol));
|
|
|
|
|
|
|
|
const appdata = gulp.src('resources/linux/code.appdata.xml', { base: '.' })
|
2023-05-30 15:53:59 +08:00
|
|
|
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
2022-06-14 14:37:10 +08:00
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
|
|
|
.pipe(replace('@@LICENSE@@', product.licenseName))
|
|
|
|
.pipe(rename('usr/share/appdata/' + product.applicationName + '.appdata.xml'));
|
|
|
|
|
|
|
|
const workspaceMime = gulp.src('resources/linux/code-workspace.xml', { base: '.' })
|
2023-05-30 15:53:59 +08:00
|
|
|
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
2022-06-14 14:37:10 +08:00
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
|
|
|
.pipe(rename('usr/share/mime/packages/' + product.applicationName + '-workspace.xml'));
|
|
|
|
|
|
|
|
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/pixmaps/' + product.linuxIconName + '.png'));
|
2024-05-15 10:29:31 +08:00
|
|
|
const icon512 = gulp.src('resources/linux/icons/code512.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/icons/hicolor/512x512/apps/' + product.linuxIconName + '.png'));
|
|
|
|
const icon256 = gulp.src('resources/linux/icons/code256.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/icons/hicolor/256x256/apps/' + product.linuxIconName + '.png'));
|
|
|
|
const icon128 = gulp.src('resources/linux/icons/code128.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/icons/hicolor/128x128/apps/' + product.linuxIconName + '.png'));
|
|
|
|
const icon96 = gulp.src('resources/linux/icons/code96.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/icons/hicolor/96x96/apps/' + product.linuxIconName + '.png'));
|
|
|
|
const icon64 = gulp.src('resources/linux/icons/code64.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/icons/hicolor/64x64/apps/' + product.linuxIconName + '.png'));
|
|
|
|
const icon48 = gulp.src('resources/linux/icons/code48.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/icons/hicolor/48x48/apps/' + product.linuxIconName + '.png'));
|
|
|
|
const icon32 = gulp.src('resources/linux/icons/code32.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/icons/hicolor/32x32/apps/' + product.linuxIconName + '.png'));
|
|
|
|
const icon24 = gulp.src('resources/linux/icons/code24.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/icons/hicolor/24x24/apps/' + product.linuxIconName + '.png'));
|
|
|
|
const icon22 = gulp.src('resources/linux/icons/code22.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/icons/hicolor/22x22/apps/' + product.linuxIconName + '.png'));
|
|
|
|
const icon16 = gulp.src('resources/linux/icons/code24.png', { base: '.' })
|
|
|
|
.pipe(rename('usr/share/icons/hicolor/16x16/apps/' + product.linuxIconName + '.png'));
|
|
|
|
|
2022-06-14 14:37:10 +08:00
|
|
|
|
|
|
|
const bash_completion = gulp.src('resources/completions/bash/code')
|
|
|
|
.pipe(replace('@@APPNAME@@', product.applicationName))
|
|
|
|
.pipe(rename('usr/share/bash-completion/completions/' + product.applicationName));
|
|
|
|
|
|
|
|
const zsh_completion = gulp.src('resources/completions/zsh/_code')
|
|
|
|
.pipe(replace('@@APPNAME@@', product.applicationName))
|
|
|
|
.pipe(rename('usr/share/zsh/vendor-completions/_' + product.applicationName));
|
|
|
|
|
|
|
|
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
|
2024-05-10 15:40:21 +08:00
|
|
|
.pipe(rename(function (p) { p.dirname = 'opt/apps/' + product.applicationName + '/' + p.dirname; }));
|
2022-06-14 14:37:10 +08:00
|
|
|
|
|
|
|
let size = 0;
|
|
|
|
const control = code.pipe(es.through(
|
|
|
|
function (f) { size += f.isDirectory() ? 4096 : f.contents.length; },
|
2023-11-24 14:27:51 +08:00
|
|
|
async function () {
|
2022-06-14 14:37:10 +08:00
|
|
|
const that = this;
|
2023-11-24 14:27:51 +08:00
|
|
|
const sysroot = await sysrootInstaller.getSysroot(debArch);
|
2024-04-30 20:57:13 +08:00
|
|
|
const dependencies = dependenciesGenerator.getDependencies('deb', binaryDir, product.applicationName, debArch, sysroot);
|
2022-06-14 14:37:10 +08:00
|
|
|
gulp.src('resources/linux/debian/control.template', { base: '.' })
|
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
2024-03-14 19:11:52 +08:00
|
|
|
.pipe(replace('@@VERSION@@', packageJson.IDEVersion))
|
2022-06-14 14:37:10 +08:00
|
|
|
.pipe(replace('@@ARCHITECTURE@@', debArch))
|
2023-11-24 14:27:51 +08:00
|
|
|
.pipe(replace('@@DEPENDS@@', dependencies.join(', ')))
|
|
|
|
.pipe(replace('@@RECOMMENDS@@', debianRecommendedDependencies.join(', ')))
|
2022-06-14 14:37:10 +08:00
|
|
|
.pipe(replace('@@INSTALLEDSIZE@@', Math.ceil(size / 1024)))
|
|
|
|
.pipe(rename('DEBIAN/control'))
|
|
|
|
.pipe(es.through(function (f) { that.emit('data', f); }, function () { that.emit('end'); }));
|
|
|
|
}));
|
|
|
|
|
|
|
|
const prerm = gulp.src('resources/linux/debian/prerm.template', { base: '.' })
|
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
|
|
|
.pipe(rename('DEBIAN/prerm'));
|
|
|
|
|
|
|
|
const postrm = gulp.src('resources/linux/debian/postrm.template', { base: '.' })
|
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
|
|
|
.pipe(rename('DEBIAN/postrm'));
|
|
|
|
|
|
|
|
const postinst = gulp.src('resources/linux/debian/postinst.template', { base: '.' })
|
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
|
|
|
.pipe(rename('DEBIAN/postinst'));
|
|
|
|
|
2024-05-15 10:29:31 +08:00
|
|
|
const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, workspaceMime, icon, icon512, icon256, icon128, icon96, icon64, icon48, icon32, icon24, icon22, icon16, bash_completion, zsh_completion, code);
|
2022-06-14 14:37:10 +08:00
|
|
|
|
|
|
|
return all.pipe(vfs.dest(destination));
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string} arch
|
|
|
|
*/
|
|
|
|
function buildDebPackage(arch) {
|
|
|
|
const debArch = getDebPackageArch(arch);
|
|
|
|
return shell.task([
|
|
|
|
'chmod 755 ' + product.applicationName + '-' + debArch + '/DEBIAN/postinst ' + product.applicationName + '-' + debArch + '/DEBIAN/prerm ' + product.applicationName + '-' + debArch + '/DEBIAN/postrm',
|
|
|
|
'mkdir -p deb',
|
|
|
|
'fakeroot dpkg-deb -b ' + product.applicationName + '-' + debArch + ' deb'
|
|
|
|
], { cwd: '.build/linux/deb/' + debArch });
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string} rpmArch
|
|
|
|
*/
|
|
|
|
function getRpmBuildPath(rpmArch) {
|
|
|
|
return '.build/linux/rpm/' + rpmArch + '/rpmbuild';
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string} arch
|
|
|
|
*/
|
|
|
|
function getRpmPackageArch(arch) {
|
|
|
|
return { x64: 'x86_64', armhf: 'armv7hl', arm64: 'aarch64' }[arch];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string} arch
|
|
|
|
*/
|
|
|
|
function prepareRpmPackage(arch) {
|
|
|
|
const binaryDir = '../VSCode-linux-' + arch;
|
|
|
|
const rpmArch = getRpmPackageArch(arch);
|
|
|
|
|
|
|
|
return function () {
|
|
|
|
const desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
|
|
|
|
.pipe(rename('BUILD/usr/share/applications/' + product.applicationName + '.desktop'));
|
|
|
|
|
|
|
|
const desktopUrlHandler = gulp.src('resources/linux/code-url-handler.desktop', { base: '.' })
|
|
|
|
.pipe(rename('BUILD/usr/share/applications/' + product.applicationName + '-url-handler.desktop'));
|
|
|
|
|
|
|
|
const desktops = es.merge(desktop, desktopUrlHandler)
|
2023-05-30 15:53:59 +08:00
|
|
|
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
|
|
|
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
2022-06-14 14:37:10 +08:00
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
|
|
|
.pipe(replace('@@EXEC@@', `/usr/share/${product.applicationName}/${product.applicationName}`))
|
|
|
|
.pipe(replace('@@ICON@@', product.linuxIconName))
|
|
|
|
.pipe(replace('@@URLPROTOCOL@@', product.urlProtocol));
|
|
|
|
|
|
|
|
const appdata = gulp.src('resources/linux/code.appdata.xml', { base: '.' })
|
2023-05-30 15:53:59 +08:00
|
|
|
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
2022-06-14 14:37:10 +08:00
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
|
|
|
.pipe(replace('@@LICENSE@@', product.licenseName))
|
2024-04-30 20:57:13 +08:00
|
|
|
.pipe(rename('BUILD/usr/share/appdata/' + product.applicationName + '.appdata.xml'));
|
2022-06-14 14:37:10 +08:00
|
|
|
|
|
|
|
const workspaceMime = gulp.src('resources/linux/code-workspace.xml', { base: '.' })
|
2023-05-30 15:53:59 +08:00
|
|
|
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
2022-06-14 14:37:10 +08:00
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
|
|
|
.pipe(rename('BUILD/usr/share/mime/packages/' + product.applicationName + '-workspace.xml'));
|
|
|
|
|
|
|
|
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
|
|
|
.pipe(rename('BUILD/usr/share/pixmaps/' + product.linuxIconName + '.png'));
|
|
|
|
|
|
|
|
const bash_completion = gulp.src('resources/completions/bash/code')
|
|
|
|
.pipe(replace('@@APPNAME@@', product.applicationName))
|
|
|
|
.pipe(rename('BUILD/usr/share/bash-completion/completions/' + product.applicationName));
|
|
|
|
|
|
|
|
const zsh_completion = gulp.src('resources/completions/zsh/_code')
|
|
|
|
.pipe(replace('@@APPNAME@@', product.applicationName))
|
|
|
|
.pipe(rename('BUILD/usr/share/zsh/site-functions/_' + product.applicationName));
|
|
|
|
|
|
|
|
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
|
|
|
|
.pipe(rename(function (p) { p.dirname = 'BUILD/usr/share/' + product.applicationName + '/' + p.dirname; }));
|
|
|
|
|
2024-03-14 19:11:52 +08:00
|
|
|
const spec = code.pipe(es.through(
|
|
|
|
async function () {
|
|
|
|
const that = this;
|
|
|
|
const dependencies = await dependenciesGenerator.getDependencies('rpm', binaryDir, product.applicationName, rpmArch);
|
|
|
|
gulp.src('resources/linux/rpm/code.spec.template', { base: '.' })
|
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
|
|
|
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
|
|
|
.pipe(replace('@@ICON@@', product.linuxIconName))
|
|
|
|
.pipe(replace('@@VERSION@@', packageJson.IDEVersion))
|
|
|
|
.pipe(replace('@@ARCHITECTURE@@', rpmArch))
|
|
|
|
.pipe(replace('@@LICENSE@@', product.licenseName))
|
|
|
|
.pipe(replace('@@QUALITY@@', product.quality || '@@QUALITY@@'))
|
|
|
|
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
|
|
|
|
.pipe(replace('@@DEPENDENCIES@@', dependencies.join(', ')))
|
|
|
|
.pipe(rename('SPECS/' + product.applicationName + '.spec'))
|
|
|
|
.pipe(es.through(function (f) { that.emit('data', f); }, function () { that.emit('end'); }));
|
|
|
|
}));
|
2022-06-14 14:37:10 +08:00
|
|
|
|
|
|
|
const specIcon = gulp.src('resources/linux/rpm/code.xpm', { base: '.' })
|
|
|
|
.pipe(rename('SOURCES/' + product.applicationName + '.xpm'));
|
|
|
|
|
|
|
|
const all = es.merge(code, desktops, appdata, workspaceMime, icon, bash_completion, zsh_completion, spec, specIcon);
|
|
|
|
|
|
|
|
return all.pipe(vfs.dest(getRpmBuildPath(rpmArch)));
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string} arch
|
|
|
|
*/
|
|
|
|
function buildRpmPackage(arch) {
|
|
|
|
const rpmArch = getRpmPackageArch(arch);
|
|
|
|
const rpmBuildPath = getRpmBuildPath(rpmArch);
|
|
|
|
const rpmOut = rpmBuildPath + '/RPMS/' + rpmArch;
|
|
|
|
const destination = '.build/linux/rpm/' + rpmArch;
|
|
|
|
|
|
|
|
return shell.task([
|
|
|
|
'mkdir -p ' + destination,
|
2024-04-30 20:57:13 +08:00
|
|
|
'HOME="$(pwd)/' + destination + '" rpmbuild -bb ' + rpmBuildPath + '/SPECS/' + product.applicationName + '.spec --target=' + rpmArch,
|
2022-06-14 14:37:10 +08:00
|
|
|
'cp "' + rpmOut + '/$(ls ' + rpmOut + ')" ' + destination + '/'
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string} arch
|
|
|
|
*/
|
|
|
|
function getSnapBuildPath(arch) {
|
|
|
|
return `.build/linux/snap/${arch}/${product.applicationName}-${arch}`;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string} arch
|
|
|
|
*/
|
|
|
|
function prepareSnapPackage(arch) {
|
|
|
|
const binaryDir = '../VSCode-linux-' + arch;
|
|
|
|
const destination = getSnapBuildPath(arch);
|
|
|
|
|
|
|
|
return function () {
|
|
|
|
// A desktop file that is placed in snap/gui will be placed into meta/gui verbatim.
|
|
|
|
const desktop = gulp.src('resources/linux/code.desktop', { base: '.' })
|
|
|
|
.pipe(rename(`snap/gui/${product.applicationName}.desktop`));
|
|
|
|
|
|
|
|
// A desktop file that is placed in snap/gui will be placed into meta/gui verbatim.
|
|
|
|
const desktopUrlHandler = gulp.src('resources/linux/code-url-handler.desktop', { base: '.' })
|
|
|
|
.pipe(rename(`snap/gui/${product.applicationName}-url-handler.desktop`));
|
|
|
|
|
|
|
|
const desktops = es.merge(desktop, desktopUrlHandler)
|
2023-05-30 15:53:59 +08:00
|
|
|
.pipe(replace('@@NAME_LONG@@', product.nameLong))
|
|
|
|
.pipe(replace('@@NAME_SHORT@@', product.nameShort))
|
2022-06-14 14:37:10 +08:00
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
|
|
|
.pipe(replace('@@EXEC@@', `${product.applicationName} --force-user-env`))
|
|
|
|
.pipe(replace('@@ICON@@', `\${SNAP}/meta/gui/${product.linuxIconName}.png`))
|
|
|
|
.pipe(replace('@@URLPROTOCOL@@', product.urlProtocol));
|
|
|
|
|
|
|
|
// An icon that is placed in snap/gui will be placed into meta/gui verbatim.
|
|
|
|
const icon = gulp.src('resources/linux/code.png', { base: '.' })
|
|
|
|
.pipe(rename(`snap/gui/${product.linuxIconName}.png`));
|
|
|
|
|
|
|
|
const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
|
|
|
|
.pipe(rename(function (p) { p.dirname = `usr/share/${product.applicationName}/${p.dirname}`; }));
|
|
|
|
|
|
|
|
const snapcraft = gulp.src('resources/linux/snap/snapcraft.yaml', { base: '.' })
|
|
|
|
.pipe(replace('@@NAME@@', product.applicationName))
|
2024-03-14 19:11:52 +08:00
|
|
|
.pipe(replace('@@VERSION@@', packageJson.IDEVersion))
|
2022-06-14 14:37:10 +08:00
|
|
|
// Possible run-on values https://snapcraft.io/docs/architectures
|
|
|
|
.pipe(replace('@@ARCHITECTURE@@', arch === 'x64' ? 'amd64' : arch))
|
|
|
|
.pipe(rename('snap/snapcraft.yaml'));
|
|
|
|
|
|
|
|
const electronLaunch = gulp.src('resources/linux/snap/electron-launch', { base: '.' })
|
|
|
|
.pipe(rename('electron-launch'));
|
|
|
|
|
|
|
|
const all = es.merge(desktops, icon, code, snapcraft, electronLaunch);
|
|
|
|
|
|
|
|
return all.pipe(vfs.dest(destination));
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param {string} arch
|
|
|
|
*/
|
|
|
|
function buildSnapPackage(arch) {
|
|
|
|
const snapBuildPath = getSnapBuildPath(arch);
|
|
|
|
// Default target for snapcraft runs: pull, build, stage and prime, and finally assembles the snap.
|
|
|
|
return shell.task(`cd ${snapBuildPath} && snapcraft`);
|
|
|
|
}
|
|
|
|
|
|
|
|
const BUILD_TARGETS = [
|
|
|
|
{ arch: 'x64' },
|
|
|
|
{ arch: 'armhf' },
|
|
|
|
{ arch: 'arm64' },
|
|
|
|
];
|
|
|
|
|
|
|
|
BUILD_TARGETS.forEach(({ arch }) => {
|
|
|
|
const debArch = getDebPackageArch(arch);
|
|
|
|
const prepareDebTask = task.define(`vscode-linux-${arch}-prepare-deb`, task.series(util.rimraf(`.build/linux/deb/${debArch}`), prepareDebPackage(arch)));
|
2024-04-30 20:57:13 +08:00
|
|
|
gulp.task(prepareDebTask);
|
2024-03-05 18:34:06 +08:00
|
|
|
const buildDebTask = task.define(`vscode-linux-${arch}-build-deb`, task.series(prepareDebTask, buildDebPackage(arch)));
|
2022-06-14 14:37:10 +08:00
|
|
|
gulp.task(buildDebTask);
|
|
|
|
|
|
|
|
const rpmArch = getRpmPackageArch(arch);
|
|
|
|
const prepareRpmTask = task.define(`vscode-linux-${arch}-prepare-rpm`, task.series(util.rimraf(`.build/linux/rpm/${rpmArch}`), prepareRpmPackage(arch)));
|
2024-04-30 20:57:13 +08:00
|
|
|
gulp.task(prepareRpmTask);
|
2024-03-05 18:34:06 +08:00
|
|
|
const buildRpmTask = task.define(`vscode-linux-${arch}-build-rpm`, task.series(prepareRpmTask, buildRpmPackage(arch)));
|
2022-06-14 14:37:10 +08:00
|
|
|
gulp.task(buildRpmTask);
|
|
|
|
|
|
|
|
const prepareSnapTask = task.define(`vscode-linux-${arch}-prepare-snap`, task.series(util.rimraf(`.build/linux/snap/${arch}`), prepareSnapPackage(arch)));
|
|
|
|
gulp.task(prepareSnapTask);
|
|
|
|
const buildSnapTask = task.define(`vscode-linux-${arch}-build-snap`, task.series(prepareSnapTask, buildSnapPackage(arch)));
|
|
|
|
gulp.task(buildSnapTask);
|
|
|
|
});
|