Compare commits

...

2 Commits

Author SHA1 Message Date
ezequielnick
c73d147938 1.8.6 Released 2025-08-31 17:32:20 +08:00
ezequielnick
489dc8ac67 chore: update&fix workflow dev version 2025-08-31 17:19:30 +08:00
3 changed files with 10 additions and 11 deletions

View File

@ -1,4 +1,4 @@
## 1.8.6-dev ## 1.8.6
**本次更新修改了软件名称,可能导致不可预期的 BUG请大家积极反馈** **本次更新修改了软件名称,可能导致不可预期的 BUG请大家积极反馈**
@ -14,6 +14,7 @@
- 修复windows 下以非管理员模式启动后,无法自动更新的权限问题 - 修复windows 下以非管理员模式启动后,无法自动更新的权限问题
- 修复 icon 切换时的重复创建问题 - 修复 icon 切换时的重复创建问题
- 修复UWPTool没有权限的问题 - 修复UWPTool没有权限的问题
- 修复定时更新订阅引入的删除后自动添加问题
### 样式调整 (Sytle) ### 样式调整 (Sytle)
- DNS 设置部分样式微调 - DNS 设置部分样式微调

View File

@ -7,7 +7,7 @@ function updatePackageVersion() {
const packagePath = 'package.json' const packagePath = 'package.json'
const packageContent = readFileSync(packagePath, 'utf-8') const packageContent = readFileSync(packagePath, 'utf-8')
const packageData = JSON.parse(packageContent) const packageData = JSON.parse(packageContent)
// 获取处理后的版本号 // 获取处理后的版本号
const newVersion = getProcessedVersion() const newVersion = getProcessedVersion()
@ -15,20 +15,18 @@ function updatePackageVersion() {
console.log(`${isDevBuild() ? 'Dev构建' : '正式构建'} - 新版本: ${newVersion}`) console.log(`${isDevBuild() ? 'Dev构建' : '正式构建'} - 新版本: ${newVersion}`)
packageData.version = newVersion packageData.version = newVersion
// 写回package.json // 写回package.json
writeFileSync(packagePath, JSON.stringify(packageData, null, 2) + '\n') writeFileSync(packagePath, JSON.stringify(packageData, null, 2) + '\n')
console.log(`✅ package.json版本号已更新为: ${newVersion}`) console.log(`✅ package.json版本号已更新为: ${newVersion}`)
} catch (error) { } catch (error) {
console.error('❌ 更新package.json版本号失败:', error.message) console.error('❌ 更新package.json版本号失败:', error.message)
process.exit(1) process.exit(1)
} }
} }
if (import.meta.url === `file://${process.argv[1]}`) { updatePackageVersion()
updatePackageVersion()
}
export { updatePackageVersion } export { updatePackageVersion }

View File

@ -26,7 +26,7 @@ export function getBaseVersion() {
const pkg = readFileSync('package.json', 'utf-8') const pkg = readFileSync('package.json', 'utf-8')
const { version } = JSON.parse(pkg) const { version } = JSON.parse(pkg)
// 移除dev版本格式后缀 // 移除dev版本格式后缀
return version.replace('-dev', '').replace(/-\d{4}-[a-f0-9]{7}$/, '') return version.replace(/-d\d{2,4}\.[a-f0-9]{7}$/, '')
} catch (error) { } catch (error) {
console.error('Failed to read package.json:', error.message) console.error('Failed to read package.json:', error.message)
return '1.0.0' return '1.0.0'
@ -38,8 +38,8 @@ export function getDevVersion() {
const baseVersion = getBaseVersion() const baseVersion = getBaseVersion()
const monthDate = getCurrentMonthDate() const monthDate = getCurrentMonthDate()
const commitHash = getGitCommitHash(true) const commitHash = getGitCommitHash(true)
return `${baseVersion}-${monthDate}-${commitHash}` return `${baseVersion}-d${monthDate}.${commitHash}`
} }
// 检查当前环境是否为dev构建 // 检查当前环境是否为dev构建