Browse Source

fix: nightly build for nocodb-sdk

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
pull/1631/head
Wing-Kam Wong 3 years ago
parent
commit
099f7cadcd
  1. 5
      .github/workflows/release-npm.yml
  2. 5
      scripts/upgradeNocodbSdk.js

5
.github/workflows/release-npm.yml

@ -46,10 +46,9 @@ jobs:
node-version: '16.x' node-version: '16.x'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- run: | - run: |
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} targetVersion=${{ github.event.inputs.tag || inputs.tag }} node scripts/bumpNocodbSdkVersion.js
cd packages/nocodb-sdk cd packages/nocodb-sdk
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} targetVersion=${{ github.event.inputs.tag || inputs.tag }} node ../../scripts/bumpNocodbSdkVersion.js npm install && npm run build && npm publish
npm install && npm run build
npm publish
cd ../.. cd ../..
targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} node scripts/upgradeNocodbSdk.js targetEnv=${{ github.event.inputs.targetEnv || inputs.targetEnv }} node scripts/upgradeNocodbSdk.js
cd packages/nc-gui cd packages/nc-gui

5
scripts/upgradeNocodbSdk.js

@ -58,9 +58,10 @@ const searchAndReplace = (target) => {
fs.readFile(d, function(err, content) { fs.readFile(d, function(err, content) {
if (err) reject(err) if (err) reject(err)
if (content.indexOf(target) > -1) { if (content.indexOf(target) > -1) {
replacePackageName(d) resolve(replacePackageName(d))
} else {
resolve()
} }
resolve()
}) })
}) })
})) }))

Loading…
Cancel
Save