chore(version): 0.3.7
This commit is contained in:
parent
c0e51c3992
commit
aa3b2d6290
@ -56,5 +56,8 @@ electronDownload:
|
||||
afterSign: scripts/notarize.js
|
||||
releaseInfo:
|
||||
releaseNotes: |
|
||||
新增设置面板,方便进行消息功能设置
|
||||
可以自定义消息字体样式
|
||||
1. 保存聊天页面状态,切换页面后恢复
|
||||
2. 修复默认助手名称为空时候的显示问题
|
||||
3. 简化系统内置智能体提示词长度
|
||||
4. 增加单个聊天内容保存到本地功能
|
||||
5. 系统内置提供商支持修改 API 地址
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cherry-studio",
|
||||
"version": "0.3.6",
|
||||
"version": "0.3.7",
|
||||
"description": "A powerful AI assistant for producer.",
|
||||
"main": "./out/main/index.js",
|
||||
"author": "kangfenmao@qq.com",
|
||||
@ -18,7 +18,8 @@
|
||||
"build:unpack": "dotenv npm run build && electron-builder --dir",
|
||||
"build:win": "dotenv npm run build && electron-builder --win --publish never",
|
||||
"build:mac": "dotenv electron-vite build && electron-builder --mac --publish never",
|
||||
"build:linux": "dotenv electron-vite build && electron-builder --linux --publish never"
|
||||
"build:linux": "dotenv electron-vite build && electron-builder --linux --publish never",
|
||||
"release": "node scripts/version.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@electron-toolkit/preload": "^3.0.0",
|
||||
|
||||
40
scripts/version.js
Normal file
40
scripts/version.js
Normal file
@ -0,0 +1,40 @@
|
||||
const { execSync } = require('child_process')
|
||||
const fs = require('fs')
|
||||
|
||||
// 执行命令并返回输出
|
||||
function exec(command) {
|
||||
return execSync(command, { encoding: 'utf8' }).trim()
|
||||
}
|
||||
|
||||
// 获取命令行参数
|
||||
const args = process.argv.slice(2)
|
||||
const versionType = args[0] || 'patch'
|
||||
const shouldPush = args.includes('push')
|
||||
|
||||
// 验证版本类型
|
||||
if (!['patch', 'minor', 'major'].includes(versionType)) {
|
||||
console.error('Invalid version type. Use patch, minor, or major.')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
// 更新版本
|
||||
exec(`yarn version ${versionType} --immediate`)
|
||||
|
||||
// 读取更新后的 package.json 获取新版本号
|
||||
const updatedPackageJson = JSON.parse(fs.readFileSync('package.json', 'utf8'))
|
||||
const newVersion = updatedPackageJson.version
|
||||
|
||||
// Git 操作
|
||||
exec('git add .')
|
||||
exec(`git commit -m "chore(version): ${newVersion}"`)
|
||||
exec(`git tag -a v${newVersion} -m "Version ${newVersion}"`)
|
||||
|
||||
console.log(`Version bumped to ${newVersion}`)
|
||||
|
||||
if (shouldPush) {
|
||||
console.log('Pushing to remote...')
|
||||
exec('git push && git push --tags')
|
||||
console.log('Pushed to remote.')
|
||||
} else {
|
||||
console.log('Changes are committed locally. Use "git push && git push --tags" to push to remote.')
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user