mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-25 04:50:26 +08:00
[build] Map illegal chars in branch names for snapshot versions
This commit is contained in:
parent
7e20883a08
commit
e3891c0388
@ -20,7 +20,8 @@ import kotlinx.serialization.json.Json
|
||||
object GetNextSnapshotIndex {
|
||||
@JvmStatic
|
||||
fun main(args: Array<String>) {
|
||||
val branch = args.getOrNull(0) ?: error("Missing branch argument")
|
||||
val branch = args.getOrNull(0)?.replace(Regex("""[/\\.,`~!@#$%^&*(){}\[\]|;]"""), "-")
|
||||
?: error("Missing branch argument")
|
||||
val commitRef = args.getOrNull(1) ?: error("Missing commitRef argument")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user