diff --git a/common/scripts/bump.js b/common/scripts/bump.js index f28908d3db..1fccc56473 100755 --- a/common/scripts/bump.js +++ b/common/scripts/bump.js @@ -53,9 +53,15 @@ function publish (name) { function main () { const args = process.argv - const version = args[2] + const doPublish = args.includes('--publish') + + const version = args.reverse().shift() if (version === undefined || version === '') { - console.log('usage: node bump.js ') + console.log('usage: node bump.js [--publish] ') + return + } + if( !/^(\d+\.)?(\d+\.)?(\*|\d+)$/.test(version)) { + console.log('Invalid ', version, ' should be xx.xx.xx') return } @@ -76,10 +82,11 @@ function main () { const res = JSON.stringify(jsons[packageName], undefined, 2) fs.writeFileSync(file, res + '\n') } - - for (const packageName of packageNames) { - if (shouldPublish(packageName)) { - publish(packageName) + if(doPublish) { + for (const packageName of packageNames) { + if (shouldPublish(packageName)) { + publish(packageName) + } } } diff --git a/packages/collaborator-client/package.json b/packages/collaborator-client/package.json index de0fe632cc..71e0c814a5 100644 --- a/packages/collaborator-client/package.json +++ b/packages/collaborator-client/package.json @@ -41,5 +41,9 @@ }, "dependencies": { "@hcengineering/core": "^0.6.32" + }, + "repository": "https://github.com/hcengineering/platform", + "publishConfig": { + "registry": "https://npm.pkg.github.com" } } diff --git a/plugins/activity/package.json b/plugins/activity/package.json index 2946c09b2f..371efa476f 100644 --- a/plugins/activity/package.json +++ b/plugins/activity/package.json @@ -43,5 +43,9 @@ "@hcengineering/preference": "^0.6.13", "@hcengineering/ui": "^0.6.15", "@hcengineering/view": "^0.6.13" + }, + "repository": "https://github.com/hcengineering/platform", + "publishConfig": { + "registry": "https://npm.pkg.github.com" } } diff --git a/plugins/time/package.json b/plugins/time/package.json index 70fae0761b..6368d76ea3 100644 --- a/plugins/time/package.json +++ b/plugins/time/package.json @@ -44,5 +44,9 @@ "@hcengineering/platform": "^0.6.11", "@hcengineering/ui": "^0.6.15", "@hcengineering/rank": "^0.6.4" + }, + "repository": "https://github.com/hcengineering/platform", + "publishConfig": { + "registry": "https://npm.pkg.github.com" } }