mejorar los archives

This commit is contained in:
Cat /dev/Nulo 2024-08-28 20:46:30 -03:00
parent a6e972ce83
commit 107d91711f

View file

@ -136,8 +136,13 @@ for (const resource of datasetInfo.result.resources) {
await rm(path); await rm(path);
} }
await writeFile(
join(dir, "dataset-info.json"),
JSON.stringify(rawDatasetInfo, null, 2),
);
const compressed = const compressed =
await $`tar -c -C ${dir} ${dir} | zstd -15 --long -T0`.blob(); await $`tar -c -C ${dir} . | zstd -15 --long -T0`.blob();
await uploadToB2Bucket(fileName, compressed); await uploadToB2Bucket(fileName, compressed);
} finally { } finally {
await $`rm -rf ${dir}`; await $`rm -rf ${dir}`;