From 49700bc7cfa279702c77e2ada2be9bb2b7f642f6 Mon Sep 17 00:00:00 2001 From: mesalogo Date: Wed, 26 Aug 2026 17:12:20 +0800 Subject: [PATCH] fix: make LoongArch preview checksum portable Generate SHA256SUMS from inside the timestamped artifact directory so it records only the DEB filename and remains verifiable after copying the preview output elsewhere. --- build/loongarch-cross/preview-deb.sh | 5 ++++- tests/loongarch-cross.test.ts | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build/loongarch-cross/preview-deb.sh b/build/loongarch-cross/preview-deb.sh index 74fdb028..3346707f 100644 --- a/build/loongarch-cross/preview-deb.sh +++ b/build/loongarch-cross/preview-deb.sh @@ -300,7 +300,10 @@ assert_loongarch_elf \ assert_loongarch_elf \ "${verify_root}/opt/${application_directory}/resources/app/${koffi_binding#${app_root}/}" -sha256sum "${artifact}" > "${artifact_root}/SHA256SUMS" +( + cd "${artifact_root}" + sha256sum "${artifact_name}" > SHA256SUMS +) cat > "${artifact_root}/preview-manifest.json" < { expect(previewScript).not.toContain( 'node_pty_version="1.1.0"' ) + expect(previewScript).toContain( + 'sha256sum "${artifact_name}" > SHA256SUMS' + ) expect(previewScript).toContain( 'assert_loongarch_elf "${koffi_binding}"' )