Kaynağa Gözat

[build] Map illegal chars in branch names for snapshot versions

Him188 2 yıl önce
ebeveyn
işleme
e3891c0388

+ 2 - 1
ci-release-helper/src/buildIndex/SnapshotVersions.kt

@@ -20,7 +20,8 @@ import kotlinx.serialization.json.Json
 object GetNextSnapshotIndex {
 object GetNextSnapshotIndex {
     @JvmStatic
     @JvmStatic
     fun main(args: Array<String>) {
     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")
         val commitRef = args.getOrNull(1) ?: error("Missing commitRef argument")