From ee355f5f909e42825607f44f8c1017d30cea8378 Mon Sep 17 00:00:00 2001 From: Techatrix Date: Sat, 10 Aug 2024 05:53:22 +0200 Subject: [PATCH] fix unused console log --- src/publish.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/publish.ts b/src/publish.ts index 5b15a34..0ac864f 100644 --- a/src/publish.ts +++ b/src/publish.ts @@ -279,10 +279,6 @@ export async function handlePublish( assert.strictEqual(key, `zls-${os}-${arch}-${version}.${extension}`); - // console.log( - // `os=${os}, arch=${arch}, version=${version}, extension=${extension}, shasum=${file_hash.digest("hex")}, size=${value.size.toString()}`, - // ); - if (SemanticVersion.parse(version) === null) { return new Response( `artifact '${key}' has an invalid version '${version}'!`, @@ -294,6 +290,7 @@ export async function handlePublish( const fileHash = createHash("sha256"); await pipeline(file.stream(), fileHash); + const fileShasum = fileHash.digest("hex"); const expectedMagicNumber = getMagicNumberOfExtension(extension); const actualMagicNumber: Uint8Array = new Uint8Array( @@ -309,6 +306,10 @@ export async function handlePublish( ); } + // console.log( + // `os=${os}, arch=${arch}, version=${version}, extension=${extension}, shasum=${fileShasum}, size=${file.size.toString()}`, + // ); + artifactFiles.push(file); artifacts.push({ @@ -316,7 +317,7 @@ export async function handlePublish( arch: arch, version: version, extension: extension, - fileShasum: fileHash.digest("hex"), + fileShasum: fileShasum, fileSize: file.size, }); }