From 56f502af0752157d41ba0d3e42efc37812af35fd Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Thu, 1 Jul 2021 02:58:13 -0700 Subject: [PATCH] Exclude docs from package checksum computation Summary: We don't need to re-publish plugin package when only docs are changed, so excluding "docs" from checksum computation Differential Revision: D29508239 fbshipit-source-id: dfae89432f68b784caf07ae24ba7711f76c649b4 --- desktop/pkg-lib/src/computePackageChecksum.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop/pkg-lib/src/computePackageChecksum.ts b/desktop/pkg-lib/src/computePackageChecksum.ts index e134db8b3..d5518129c 100644 --- a/desktop/pkg-lib/src/computePackageChecksum.ts +++ b/desktop/pkg-lib/src/computePackageChecksum.ts @@ -39,6 +39,11 @@ export default async function computePackageChecksum( hash.setEncoding('hex'); const files = (await packlist({path: dir})).sort(); for (const file of files) { + const segments = file.split(path.sep); + if (segments.length > 0 && segments[0] === 'docs') { + continue; + } + const filePath = path.resolve(dir, file); if (filePath === fullChecksumFilePath) {