From 1c84bdc83d4b8dc8935699efd1590b126aa2daa3 Mon Sep 17 00:00:00 2001 From: Diogo Mendes Matsubara Date: Mon, 10 Jun 2024 16:13:11 +0200 Subject: [PATCH] fix: don't output full .Packages-* --- dist/publish-crates-debian-main.js | 6 +++--- src/publish-crates-debian.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/publish-crates-debian-main.js b/dist/publish-crates-debian-main.js index cfade69..3bbc27f 100644 --- a/dist/publish-crates-debian-main.js +++ b/dist/publish-crates-debian-main.js @@ -127735,10 +127735,10 @@ async function main(input) { (0,_command__WEBPACK_IMPORTED_MODULE_5__.sh)("sudo apt-get update"); (0,_command__WEBPACK_IMPORTED_MODULE_5__.sh)("sudo apt-get install -y dpkg-dev"); await fs_promises__WEBPACK_IMPORTED_MODULE_0__.writeFile(packagesPath, (0,_command__WEBPACK_IMPORTED_MODULE_5__.sh)(`dpkg-scanpackages --multiversion ${input.version}`)); - const packages = (0,_command__WEBPACK_IMPORTED_MODULE_5__.sh)("cat .Packages-*"); // NOTE: An unzipped package index is necessary for apt-get to recognize the - // local repository created below - await fs_promises__WEBPACK_IMPORTED_MODULE_0__.writeFile(allPackagesPath, packages); + // local repository created below. By redirecting the output we also avoid breaking the Github webUI displaying too much data. + (0,_command__WEBPACK_IMPORTED_MODULE_5__.sh)(`cat .Packages-* > ${allPackagesPath}`); + const packages = await fs_promises__WEBPACK_IMPORTED_MODULE_0__.readFile(allPackagesPath, 'utf8'); await fs_promises__WEBPACK_IMPORTED_MODULE_0__.writeFile(allPackagesGzippedPath, await gzip(packages)); (0,_command__WEBPACK_IMPORTED_MODULE_5__.sh)("ls -R"); _actions_core__WEBPACK_IMPORTED_MODULE_2__.info(`Adding a local Debian repository at ${process.cwd()}`); diff --git a/src/publish-crates-debian.ts b/src/publish-crates-debian.ts index 064c1fd..7de05c2 100644 --- a/src/publish-crates-debian.ts +++ b/src/publish-crates-debian.ts @@ -86,10 +86,10 @@ export async function main(input: Input) { sh("sudo apt-get install -y dpkg-dev"); await fs.writeFile(packagesPath, sh(`dpkg-scanpackages --multiversion ${input.version}`)); - const packages = sh("cat .Packages-*"); // NOTE: An unzipped package index is necessary for apt-get to recognize the - // local repository created below - await fs.writeFile(allPackagesPath, packages); + // local repository created below. By redirecting the output we also avoid breaking the Github webUI displaying too much data. + sh(`cat .Packages-* > ${allPackagesPath}`); + const packages = await fs.readFile(allPackagesPath, 'utf8'); await fs.writeFile(allPackagesGzippedPath, await gzip(packages)); sh("ls -R");