small improvement in uploadSonatypePublicationmain.kts

This commit is contained in:
2025-06-02 11:44:09 +06:00
parent 62930231e4
commit affcffe270

View File

@@ -110,11 +110,17 @@ val api = CentralSonatypeOSSRHApi(
api.repositories() ?.forEach {
if (it.state == "open") {
api.upload(it.key, "user_managed")
println("Start uploading of ${it.key}")
val uploaded = api.upload(it.key, "user_managed")
println("Complete uploading of ${it.key}. Status ok: $uploaded")
}
}
api.repositories() ?.forEach {
if (it.state == "closed") {
api.upload(it.key, "automatic")
println("Start uploading of ${it.key} with auto mode ")
val uploaded = api.upload(it.key, "automatic")
println("Complete uploading of ${it.key} with auto mode . Status ok: $uploaded")
}
}