fix: use xz compression when building deb package (#230471)

pull/230471/merge
Robo 2024-10-04 20:25:06 +09:00 committed by GitHub
parent a1c062b862
commit ba6907515e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -305,6 +305,11 @@ steps:
- script: |
set -e
npm run gulp "vscode-linux-$(VSCODE_ARCH)-build-deb"
file_output=$(file $(ls .build/linux/deb/*/deb/*.deb))
if [[ "$file_output" != *"data compression xz"* ]]; then
echo "Error: unknown compression. $file_output"
exit 1
fi
echo "##vso[task.setvariable variable=DEB_PATH]$(ls .build/linux/deb/*/deb/*.deb)"
displayName: Build deb package

View File

@ -128,7 +128,7 @@ function buildDebPackage(arch) {
return async () => {
await exec(`chmod 755 ${product.applicationName}-${debArch}/DEBIAN/postinst ${product.applicationName}-${debArch}/DEBIAN/prerm ${product.applicationName}-${debArch}/DEBIAN/postrm`, { cwd });
await exec('mkdir -p deb', { cwd });
await exec(`fakeroot dpkg-deb -b ${product.applicationName}-${debArch} deb`, { cwd });
await exec(`fakeroot dpkg-deb -Zxz -b ${product.applicationName}-${debArch} deb`, { cwd });
};
}