Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions script/lib/create-debian-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,32 @@ module.exports = function(packagedAppPath) {
);

console.log(`Generating .deb file from ${debianPackageDirPath}`);
spawnSync('fakeroot', ['dpkg-deb', '-b', debianPackageDirPath], {
stdio: 'inherit'
});

// don't compress by default to speed up build
let compressionLevel = 0;
let compressionType = 'none';
if (process.env.IS_RELEASE_BRANCH || process.env.IS_SIGNED_ZIP_BRANCH) {
compressionLevel = 6;
compressionType = 'xz';
}
// use sudo if available to speed up build
let sudoCommand = 'fakeroot';
if (process.env.CI === true || (process.getuid && process.getuid() === 0)) {
sudoCommand = 'sudo';
}
spawnSync(
sudoCommand,
[
'dpkg-deb',
`-Z${compressionType}`,
`-z${compressionLevel}`,
'-b',
debianPackageDirPath
],
{
stdio: 'inherit'
}
);

console.log(
`Copying generated package into "${outputDebianPackageFilePath}"`
Expand Down
2 changes: 1 addition & 1 deletion script/vsts/platforms/templates/preparation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ steps:
- script: |
sudo apt-get update
sudo apt-get install -y wget software-properties-common
sudo apt-get install -y build-essential ca-certificates xvfb fakeroot git libsecret-1-dev rpm libx11-dev libxkbfile-dev xz-utils xorriso zsync libxss1 libgconf2-4 libgtk-3-0 libasound2 libicu-dev
sudo apt-get install -y build-essential ca-certificates xvfb fakeroot git libsecret-1-dev rpm libx11-dev libxkbfile-dev xz-utils xorriso zsync libxss1 libgconf2-4 libgtk-3-0 libasound2 libicu-dev dpkg
# clang 9 is included in the image
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 10
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 10
Expand Down