From ba6907515e1423671b91deb96b2088c5cd8d35a7 Mon Sep 17 00:00:00 2001 From: Robo Date: Fri, 4 Oct 2024 20:25:06 +0900 Subject: [PATCH] fix: use xz compression when building deb package (#230471) --- build/azure-pipelines/linux/product-build-linux.yml | 5 +++++ build/gulpfile.vscode.linux.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build/azure-pipelines/linux/product-build-linux.yml b/build/azure-pipelines/linux/product-build-linux.yml index ccb4b376e65..fe3951c9e5f 100644 --- a/build/azure-pipelines/linux/product-build-linux.yml +++ b/build/azure-pipelines/linux/product-build-linux.yml @@ -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 diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js index 5fa5a5d136e..fb0e5a463dc 100644 --- a/build/gulpfile.vscode.linux.js +++ b/build/gulpfile.vscode.linux.js @@ -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 }); }; }