From 4f5fe51659037464c460174e57b2403fb0f96484 Mon Sep 17 00:00:00 2001 From: Nick Chen Date: Fri, 21 Jul 2017 13:41:05 -0700 Subject: [PATCH] Add force-publish This enables us to publish even if nothing has changed since the last time. Useful for situations where we just want to force an increment in version numbers. See https://www.npmjs.com/package/lerna#--force-publish-packages @W-4162004@ --- scripts/publish.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/publish.js b/scripts/publish.js index 37e54b3be8..dd5752e52d 100644 --- a/scripts/publish.js +++ b/scripts/publish.js @@ -27,9 +27,13 @@ shell.exec('npm run test'); // This will still make a commit in Git with the tag of the version used const nextVersion = process.env['VERSION_INCREMENT']; if (nextVersion) { - shell.exec(`lerna publish --exact --repo-version ${nextVersion} --skip-npm`); + shell.exec( + `lerna publish --force-publish --exact --repo-version ${nextVersion} --yes --skip-npm` + ); } else { - shell.exec('lerna publish --exact --cd-version minor --yes --skip-npm'); + shell.exec( + 'lerna publish --force-publish --exact --cd-version minor --yes --skip-npm' + ); } // Generate the .vsix files