Rename preview build type to nightly and label FOSS builds (#3760)

Assisted-by: Claude:claude-opus-5
This commit is contained in:
AntsyLich
2026-08-15 01:20:55 +06:00
committed by GitHub
parent 77e88a2159
commit b393088cfa
6 changed files with 23 additions and 21 deletions
@@ -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,