fix: version update 404

This commit is contained in:
ezequielnick 2025-09-07 12:39:53 +08:00
parent 305210cb96
commit 3fbd606b82
5 changed files with 86 additions and 0 deletions

View File

@ -132,6 +132,8 @@ jobs:
}
- name: Generate checksums
run: pnpm checksum setup.exe portable.7z
- name: Copy Legacy Artifacts
run: pnpm copy-legacy
- name: Upload Artifacts
if: startsWith(github.ref, 'refs/heads/')
uses: actions/upload-artifact@v4
@ -208,6 +210,8 @@ jobs:
}
- name: Generate checksums
run: pnpm checksum setup.exe portable.7z
- name: Copy Legacy Artifacts
run: pnpm copy-legacy
- name: Upload Artifacts
if: startsWith(github.ref, 'refs/heads/')
uses: actions/upload-artifact@v4
@ -277,6 +281,8 @@ jobs:
run: pnpm build:linux --${{ matrix.arch }}
- name: Generate checksums
run: pnpm checksum .deb .rpm
- name: Copy Legacy Artifacts
run: pnpm copy-legacy
- name: Upload Artifacts
if: startsWith(github.ref, 'refs/heads/')
uses: actions/upload-artifact@v4
@ -371,6 +377,8 @@ jobs:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Generate checksums
run: pnpm checksum .pkg
- name: Copy Legacy Artifacts
run: pnpm copy-legacy
- name: Upload Artifacts
if: startsWith(github.ref, 'refs/heads/')
uses: actions/upload-artifact@v4
@ -464,6 +472,8 @@ jobs:
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
- name: Generate checksums
run: pnpm checksum .pkg
- name: Copy Legacy Artifacts
run: pnpm copy-legacy
- name: Upload Artifacts
if: startsWith(github.ref, 'refs/heads/')
uses: actions/upload-artifact@v4

View File

@ -22,5 +22,7 @@ rm -f "$HELPER_PATH"
# 清理可能存在的旧版本文件
rm -rf "/Applications/Clash Party.app"
rm -rf "/Applications/Clash\\ Party.app"
rm -rf "/Applications/Mihomo Party.app"
rm -rf "/Applications/Mihomo\\ Party.app"
exit 0

View File

@ -4,6 +4,12 @@
- 增加关闭动画开关
- 增加订阅超时时间设置
### 修复 (Fix)
- 修复 vless 协议 short-id 的解析错误问题
- 修复 MacOS 进入轻量模式内核退出的问题
- 修复 AUR 发布问题
- 修复 改名后升级提示404的问题
### 优化 (Optimize)
- socket 管理防止内核通信失败

View File

@ -15,6 +15,8 @@
"prepare:dev": "node scripts/update-version.mjs && node scripts/prepare.mjs",
"updater": "node scripts/updater.mjs",
"checksum": "node scripts/checksum.mjs",
"copy-legacy": "node scripts/copy-legacy-artifacts.mjs",
"test-copy-legacy": "node scripts/test-copy-legacy.mjs",
"telegram": "node scripts/telegram.mjs release",
"telegram:dev": "node scripts/telegram.mjs dev",
"artifact": "node scripts/artifact.mjs",

View File

@ -0,0 +1,66 @@
import { readFileSync, readdirSync, writeFileSync, copyFileSync, existsSync } from 'fs'
import { join } from 'path'
/**
* 复制打包产物并重命名为兼容旧版本的文件名
* clash-party 重命名为 mihomo-party用于更新检测兼容性
*/
const distDir = 'dist'
if (!existsSync(distDir)) {
console.log('❌ dist 目录不存在,请先执行打包命令')
process.exit(1)
}
const files = readdirSync(distDir)
console.log('📦 开始处理打包产物...')
let copiedCount = 0
for (const file of files) {
if (file.includes('clash-party') && !file.endsWith('.sha256')) {
const newFileName = file.replace('clash-party', 'mihomo-party')
const sourcePath = join(distDir, file)
const targetPath = join(distDir, newFileName)
try {
copyFileSync(sourcePath, targetPath)
console.log(`✅ 复制: ${file} -> ${newFileName}`)
copiedCount++
const sha256File = `${file}.sha256`
const sha256Path = join(distDir, sha256File)
if (existsSync(sha256Path)) {
const newSha256File = `${newFileName}.sha256`
const newSha256Path = join(distDir, newSha256File)
const sha256Content = readFileSync(sha256Path, 'utf8')
writeFileSync(newSha256Path, sha256Content)
console.log(`✅ 复制校验文件: ${sha256File} -> ${newSha256File}`)
copiedCount++
}
} catch (error) {
console.error(`❌ 复制文件失败: ${file}`, error.message)
}
}
}
if (copiedCount > 0) {
console.log(`🎉 成功复制 ${copiedCount} 个文件`)
console.log('📋 现在 dist 目录包含以下文件:')
const finalFiles = readdirSync(distDir).sort()
finalFiles.forEach(file => {
if (file.includes('clash-party') || file.includes('mihomo-party')) {
const isLegacy = file.includes('mihomo-party')
console.log(` ${isLegacy ? '🔄' : '📦'} ${file}`)
}
})
console.log(' 📦 = 原始文件 (clash-party)')
console.log(' 🔄 = 兼容文件 (mihomo-party)')
} else {
console.log(' 没有找到需要复制的 clash-party 文件')
}