|
|
@ -18,11 +18,28 @@ const replacePackageName = (filePath) => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const replacePackageVersion = (filePath) => { |
|
|
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
|
|
|
return fs.readFile(filePath, 'utf8', function (err, data) { |
|
|
|
|
|
|
|
if (err) return reject(err) |
|
|
|
|
|
|
|
var result = data.replace(/workspace:\*/g, nocodbSdkPackage.version); |
|
|
|
|
|
|
|
return fs.writeFile(filePath, result, 'utf8', function (err) { |
|
|
|
|
|
|
|
if (err) return reject(err) |
|
|
|
|
|
|
|
return resolve() |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const bumbVersionAndSave = () => { |
|
|
|
const bumbVersionAndSave = () => { |
|
|
|
// upgrade nocodb-sdk version in nocodb
|
|
|
|
// upgrade nocodb-sdk version in nocodb & nc-gui
|
|
|
|
execSync(`pnpm --filter=nocodb install ${nocodbSdkPackage.name}@${nocodbSdkPackage.version}`, {}); |
|
|
|
Promise.all([ |
|
|
|
// upgrade nocodb-sdk version in nc-gui
|
|
|
|
replacePackageVersion(path.join(__dirname, '..', 'packages', 'nocodb', 'package.json')), |
|
|
|
execSync(`pnpm --filter=nc-gui install ${nocodbSdkPackage.name}@${nocodbSdkPackage.version}`, {}); |
|
|
|
replacePackageVersion(path.join(__dirname, '..', 'packages', 'nc-gui', 'package.json')), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
]).then(() => { |
|
|
|
|
|
|
|
execSync(`pnpm --filter=nocodb --filter=nc-gui install`, {}); |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const dfs = function(dir) { |
|
|
|
const dfs = function(dir) { |
|
|
|