fix: version check
This commit is contained in:
@@ -19,7 +19,7 @@ android {
|
||||
versionCode = 1
|
||||
// В продакшн-сборке версию приложения подставляет CI (env APP_VERSION = дата ГГГГ.ММ.ДД).
|
||||
// Локально и при отсутствии переменной — fallback "1.0".
|
||||
versionName = System.getenv("APP_VERSION") ?: "debug"
|
||||
versionName = System.getenv("APP_VERSION") ?: "v2026.09.17"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ class AppUpdater(
|
||||
}
|
||||
|
||||
val remoteVersion = release.tagName?.trimStart('v', 'V')
|
||||
if (remoteVersion == null || !isNewerVersion(remoteVersion, BuildConfig.VERSION_NAME)) {
|
||||
if (remoteVersion == null || !isNewerVersion(remoteVersion, BuildConfig.VERSION_NAME.trimStart('v', 'V'))) {
|
||||
_state.value = UpdateState.UpToDate
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user