mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
chore: Check hotfix before build number
Since build number only matters if it's an unstable release
This commit is contained in:
parent
4a386adc62
commit
87d44b1a5a
1 changed files with 3 additions and 3 deletions
|
@ -26,10 +26,10 @@ data class Version(
|
||||||
patch.compareTo(other.patch)).compareTo(0)
|
patch.compareTo(other.patch)).compareTo(0)
|
||||||
// if semver is equal, check version stage (release (3) > beta (2) > alpha (1))
|
// if semver is equal, check version stage (release (3) > beta (2) > alpha (1))
|
||||||
if (rt == 0) rt = stage.weight.compareTo(other.stage.weight)
|
if (rt == 0) rt = stage.weight.compareTo(other.stage.weight)
|
||||||
// if stage is also equal, we compare build number
|
// if stage is also equal, check if it's a hotfix (1.2.3 vs 1.2.3.1)
|
||||||
if (rt == 0) rt = build.compareTo(other.build)
|
|
||||||
// if everything are equal, check if it's a hotfix (1.2.3 vs 1.2.3.1)
|
|
||||||
if (rt == 0) rt = hotfix.compareTo(other.hotfix)
|
if (rt == 0) rt = hotfix.compareTo(other.hotfix)
|
||||||
|
// if everything are equal, we compare build number. Still only matters on unstable (beta and nightly) releases
|
||||||
|
if (rt == 0) rt = build.compareTo(other.build)
|
||||||
|
|
||||||
return rt
|
return rt
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue