mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
732 B
18 lines
732 B
3 years ago
|
const fs = require('fs')
|
||
|
const path = require('path')
|
||
|
console.log(path.join(__dirname, '..', 'packages', 'nocodb-sdk', 'package.json'))
|
||
|
const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'packages', 'nocodb-sdk', 'package.json'), 'utf8'))
|
||
|
const version = packageJson.version
|
||
|
.replace(/\.(\d+)$/, (_, v) => {
|
||
|
return `.${++v}`
|
||
|
})
|
||
|
|
||
|
if (process.env.targetEnv === 'DEV') {
|
||
|
// nightly build
|
||
|
// e.g. 0.84.2-20220220-1250
|
||
|
packageJson.version = `${packageJson.version}-${process.env.targetVersion}`
|
||
|
packageJson.name += '-daily'
|
||
|
} else {
|
||
|
packageJson.version = version
|
||
|
}
|
||
|
fs.writeFileSync(path.join(__dirname, '..', 'packages', 'nocodb-sdk', 'package.json'), JSON.stringify(packageJson, 0, 2))
|