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.
This commit is contained in:
mesalogo
2026-08-26 17:12:20 +08:00
parent fcdcc8e081
commit 49700bc7cf
2 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -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" <<EOF
{
"formatVersion": 1,
+3
View File
@@ -97,6 +97,9 @@ describe('LoongArch preview package contract', () => {
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}"'
)