feat(gui-v2): add bumpNcGuiVersion

This commit is contained in:
Wing-Kam Wong
2022-08-22 15:47:07 +08:00
parent f81e8be2b4
commit 8ee193a578
2 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
const fs = require('fs')
const path = require('path')
const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'packages', 'nc-lib-gui-2', 'package.json'), 'utf8'))
if (process.env.targetEnv === 'DEV') {
// nightly build
// e.g. 0.84.2-20220220-1250
// pr build
// e.g. 0.84.2-pr-1234-20220220-1250
packageJson.version = `${packageJson.version}-${process.env.targetVersion}`
packageJson.name += '-daily'
} else {
packageJson.version = process.env.targetVersion
}
fs.writeFileSync(path.join(__dirname, '..', 'packages', 'nc-lib-gui-2', 'package.json'), JSON.stringify(packageJson, 0, 2))