Browse Source

feat(gui-v2): add bumpNcGuiVersion

pull/3273/head
Wing-Kam Wong 2 years ago
parent
commit
8ee193a578
  1. 1
      .github/workflows/release-gui-v2.yml
  2. 16
      scripts/bumpNcGuiVersion.js

1
.github/workflows/release-gui-v2.yml

@ -39,6 +39,7 @@ jobs:
cd ../.. &&
sleep 30 &&
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} node scripts/upgradeNocodbSdk2.js &&
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} node scripts/bumpNcGuiVersion.js &&
cd packages/nc-gui-v2 &&
npm install &&
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} targetVersion=${{ github.event.inputs.tag || inputs.tag }} npm run build:copy:publish &&

16
scripts/bumpNcGuiVersion.js

@ -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))
Loading…
Cancel
Save