From a088b51e24dbbac4ff79a58718f3215a91a85be1 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Mon, 20 Feb 2023 22:41:48 +0600 Subject: [PATCH] Fix CI Signed-off-by: Denis Bykhov --- common/scripts/bump.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/common/scripts/bump.js b/common/scripts/bump.js index 888e9c0829..af504e5c93 100755 --- a/common/scripts/bump.js +++ b/common/scripts/bump.js @@ -94,15 +94,21 @@ function bumpPackage (name, dependency, depVersion) { function publish (name) { const package = packages[name] - execSync(`cd ${package.path}`, { encoding: 'utf-8' }) - execSync(`npm publish`, { encoding: 'utf-8' }) - execSync(`cd ../..`, { encoding: 'utf-8' }) + execSync(`cd ${package.path} && npm publish && cd ../..`, { encoding: 'utf-8' }) +} + +function getConfig () { + const res = execSync('node common/scripts/install-run-rush.js list -p --json', { encoding: 'utf-8' }) + const index = res.indexOf('{') + const list = res.substring(index) + const config = JSON.parse(list) + return config } function main () { const args = process.argv - const config = JSON.parse(execSync('node common/scripts/install-run-rush.js list -p --json', { encoding: 'utf-8' })) + const config = getConfig() fillPackages(config) buildDependencyTree()