From 5d925c7d3f07e2ae98404c2a5e4cd991d81f46e2 Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Mon, 18 Oct 2021 15:58:58 +0530 Subject: [PATCH] build: Allow package.json changes when autoreleasing next (#4068) --- scripts/autorelease.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/autorelease.js b/scripts/autorelease.js index 45a0b1d4..a3687485 100644 --- a/scripts/autorelease.js +++ b/scripts/autorelease.js @@ -31,9 +31,11 @@ exec(`git diff --name-only HEAD^ HEAD`, async (error, stdout, stderr) => { const filesToIgnoreRegex = /src\/excalidraw-app|packages\/utils/; const excalidrawPackageFiles = changedFiles.filter((file) => { - return file.indexOf("src") >= 0 && !filesToIgnoreRegex.test(file); + return ( + (file.indexOf("src") >= 0 || file.indexOf("package.json")) >= 0 && + !filesToIgnoreRegex.test(file) + ); }); - if (!excalidrawPackageFiles.length) { process.exit(0); } @@ -46,6 +48,5 @@ exec(`git diff --name-only HEAD^ HEAD`, async (error, stdout, stderr) => { // update readme const data = fs.readFileSync(`${excalidrawDir}/README_NEXT.md`, "utf8"); fs.writeFileSync(`${excalidrawDir}/README.md`, data, "utf8"); - publish(); });