mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 02:34:39 +00:00
Change beta version suffix logic (again)
Instead of going by commits, it will be (01, 02, 03, etc) based on the last beta version (if any)
This commit is contained in:
parent
59ec510e2d
commit
760615fbc6
2 changed files with 8 additions and 10 deletions
|
@ -11,15 +11,14 @@ fun Project.getCommitCount(): String {
|
|||
// return "1"
|
||||
}
|
||||
|
||||
fun Project.getCommitCountSinceLastRelease(): String {
|
||||
fun Project.getBetaCount(): String {
|
||||
val betaTags = runCommand("git tag -l --sort=refname v${AndroidVersions.versionName}-b*")
|
||||
return if (betaTags.isNotEmpty()) {
|
||||
val betaTag = betaTags.split("\n").last()
|
||||
runCommand("git rev-list --count $betaTag..HEAD").toIntOrNull()?.toString() ?: "1"
|
||||
return String.format("%02d", if (betaTags.isNotEmpty()) {
|
||||
val betaTag = betaTags.split("\n").last().substringAfter("-b").toIntOrNull()
|
||||
((betaTag ?: 0) + 1)
|
||||
} else {
|
||||
val lastTag = runCommand("git describe --tags --abbrev=0")
|
||||
runCommand("git rev-list --count $lastTag..HEAD").toIntOrNull()?.toString() ?: "1"
|
||||
}
|
||||
1
|
||||
})
|
||||
// return "1"
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue