Rename preview build type to nightly and label FOSS builds (#3760)
Assisted-by: Claude:claude-opus-5
This commit is contained in:
@@ -11,7 +11,7 @@ class GetApplicationRelease(
|
||||
|
||||
// Check if latest version is different from current version
|
||||
val isNewVersion = isNewVersion(
|
||||
arguments.isPreview,
|
||||
arguments.isNightly,
|
||||
arguments.commitCount,
|
||||
arguments.versionName,
|
||||
release.version,
|
||||
@@ -23,15 +23,15 @@ class GetApplicationRelease(
|
||||
}
|
||||
|
||||
private fun isNewVersion(
|
||||
isPreview: Boolean,
|
||||
isNightly: Boolean,
|
||||
commitCount: Int,
|
||||
versionName: String,
|
||||
versionTag: String,
|
||||
): Boolean {
|
||||
// Removes prefixes like "r" or "v"
|
||||
val newVersion = versionTag.replace("[^\\d.]".toRegex(), "")
|
||||
return if (isPreview) {
|
||||
// Preview builds: based on releases in "mihonapp/mihon-preview" repo
|
||||
return if (isNightly) {
|
||||
// Nightly builds: based on releases in "mihonapp/mihon-preview" repo
|
||||
// tagged as something like "r1234"
|
||||
newVersion.toInt() > commitCount
|
||||
} else {
|
||||
@@ -54,7 +54,7 @@ class GetApplicationRelease(
|
||||
|
||||
data class Arguments(
|
||||
val isFoss: Boolean,
|
||||
val isPreview: Boolean,
|
||||
val isNightly: Boolean,
|
||||
val commitCount: Int,
|
||||
val versionName: String,
|
||||
val repository: String,
|
||||
|
||||
Reference in New Issue
Block a user