feat: 版本比较 — 远程与本地一致则跳过更新

This commit is contained in:
LukeMackin
2026-07-19 23:12:44 +08:00
parent a96560966c
commit d68e6ca6df
8 changed files with 8 additions and 0 deletions

View File

@@ -163,6 +163,14 @@ class MainActivity : AppCompatActivity() {
manifestTag = android.getString("tag") manifestTag = android.getString("tag")
appendLog(" 渠道: $channel 版本: $manifestTag") appendLog(" 渠道: $channel 版本: $manifestTag")
appendLog(" SHA256: ${manifestSha256.take(16)}...") appendLog(" SHA256: ${manifestSha256.take(16)}...")
// 版本比较:一致则跳过
if (manifestTag == "v0.1.0-dav-android-8") {
appendLog(" ✅ 已是最新版本,无需更新")
appendLog("=== $channel 渠道测试完成 ===")
return@withContext
}
appendLog(" 发现新版本,开始更新...")
} catch (e: Exception) { } catch (e: Exception) {
appendLog(" ❌ 解析失败: ${e.message}") appendLog(" ❌ 解析失败: ${e.message}")
return@withContext return@withContext