mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-22 19:38:17 +00:00
Fix published packages and bump script (#6778)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
36b658298d
commit
810a75067d
@ -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 <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
|
||||
}
|
||||
|
||||
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,5 +41,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@hcengineering/core": "^0.6.32"
|
||||
},
|
||||
"repository": "https://github.com/hcengineering/platform",
|
||||
"publishConfig": {
|
||||
"registry": "https://npm.pkg.github.com"
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user