mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 18:00:33 +08:00
Fix file detecting
This commit is contained in:
parent
f70ad5191b
commit
0c905f8cd0
@ -91,7 +91,7 @@ fun Project.findLatestFile(): Map.Entry<String, File>? {
|
||||
return File(projectDir, "build/libs").walk()
|
||||
.filter { it.isFile }
|
||||
.onEach { println("all files=$it") }
|
||||
.filter { it.name.matches(Regex("""${project.name}-([0-9]|\.)*\.jar""")) }
|
||||
.filter { it.name.matches(Regex("""${project.name}-([0-9]|\.)*-all\.jar""")) }
|
||||
.onEach { println("matched file: ${it.name}") }
|
||||
.associateBy { it.nameWithoutExtension.substringAfterLast('-') }
|
||||
.onEach { println("versions: $it") }
|
||||
@ -100,4 +100,4 @@ fun Project.findLatestFile(): Map.Entry<String, File>? {
|
||||
acc + 100.0.pow(2 - index).toInt() * (s.toIntOrNull() ?: 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user