12 Star 60 Fork 30

Gitee 极速下载/tooljet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/ToolJet/ToolJet
克隆/下载
update-version.js 1.13 KB
一键复制 编辑 原始数据 按行查看 历史
// As we are maintaining three .version files, this script will help in updating it one go
const fs = require('fs');
const path = require('path');
// Get the new version from the command-line arguments
const newVersion = process.argv[2];
if (!newVersion) {
console.error('Usage: node update-version.js <new-version>');
process.exit(1);
}
// Function to update version in a file
function updateVersion(filePath, newVersion) {
const content = fs.readFileSync(filePath, 'utf-8');
const updatedContent = content.replace(/\d+\.\d+\.\d+/, newVersion);
fs.writeFileSync(filePath, updatedContent, 'utf-8');
console.log(`Updated version in ${filePath} to ${newVersion}`);
}
// Update version in both server and client folders
const versionPath = path.join(__dirname, '.version')
const serverVersionFilePath = path.join(__dirname, 'server', '.version');
const frontendVersionFilePath = path.join(__dirname, 'frontend', '.version');
updateVersion(versionPath,newVersion)
updateVersion(serverVersionFilePath, newVersion);
updateVersion(frontendVersionFilePath, newVersion);
// eg.---> npm run update-version <version> ---> npm run update-version 3.0.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/mirrors/tooljet.git
git@gitee.com:mirrors/tooljet.git
mirrors
tooljet
tooljet
develop

搜索帮助

0d507c66 1850385 C8b1a773 1850385