Fix published packages and bump script (#6778)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-10-02 17:58:46 +07:00 committed by GitHub
parent 36b658298d
commit 810a75067d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 6 deletions

View File

@ -53,9 +53,15 @@ function publish (name) {
function main () { function main () {
const args = process.argv const args = process.argv
const version = args[2] const doPublish = args.includes('--publish')
const version = args.reverse().shift()
if (version === undefined || version === '') { if (version === undefined || version === '') {
console.log('usage: node bump.js <version>') console.log('usage: node bump.js [--publish] <version>')
return
}
if( !/^(\d+\.)?(\d+\.)?(\*|\d+)$/.test(version)) {
console.log('Invalid <version>', version, ' should be xx.xx.xx')
return return
} }
@ -76,10 +82,11 @@ function main () {
const res = JSON.stringify(jsons[packageName], undefined, 2) const res = JSON.stringify(jsons[packageName], undefined, 2)
fs.writeFileSync(file, res + '\n') fs.writeFileSync(file, res + '\n')
} }
if(doPublish) {
for (const packageName of packageNames) { for (const packageName of packageNames) {
if (shouldPublish(packageName)) { if (shouldPublish(packageName)) {
publish(packageName) publish(packageName)
}
} }
} }

View File

@ -41,5 +41,9 @@
}, },
"dependencies": { "dependencies": {
"@hcengineering/core": "^0.6.32" "@hcengineering/core": "^0.6.32"
},
"repository": "https://github.com/hcengineering/platform",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
} }
} }

View File

@ -43,5 +43,9 @@
"@hcengineering/preference": "^0.6.13", "@hcengineering/preference": "^0.6.13",
"@hcengineering/ui": "^0.6.15", "@hcengineering/ui": "^0.6.15",
"@hcengineering/view": "^0.6.13" "@hcengineering/view": "^0.6.13"
},
"repository": "https://github.com/hcengineering/platform",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
} }
} }

View File

@ -44,5 +44,9 @@
"@hcengineering/platform": "^0.6.11", "@hcengineering/platform": "^0.6.11",
"@hcengineering/ui": "^0.6.15", "@hcengineering/ui": "^0.6.15",
"@hcengineering/rank": "^0.6.4" "@hcengineering/rank": "^0.6.4"
},
"repository": "https://github.com/hcengineering/platform",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
} }
} }