one more improvement

This commit is contained in:
2025-06-02 11:45:30 +06:00
parent affcffe270
commit 05fd1c2b14
2 changed files with 17 additions and 11 deletions

View File

@@ -19,6 +19,8 @@ for project in "${projects[@]}"; do
assert_success ./gradlew "$project:publishAllPublicationsToSonatypeRepository" --no-parallel --quiet
echo "Complete publishing of $project"
echo "Start uploading of $project"
assert_success ./uploadSonatypePublication.main.kts --quiet
assert_success ./uploadSonatypePublication.main.kts --user_manager
echo "Complete uploading of $project"
done
assert_success ./uploadSonatypePublication.main.kts --automatic

View File

@@ -108,19 +108,23 @@ val api = CentralSonatypeOSSRHApi(
}
)
api.repositories() ?.forEach {
if (it.state == "open") {
println("Start uploading of ${it.key}")
val uploaded = api.upload(it.key, "user_managed")
if (args.any { "--user_manager" }) {
api.repositories()?.forEach {
if (it.state == "open") {
println("Start uploading of ${it.key}")
val uploaded = api.upload(it.key, "user_managed")
println("Complete uploading of ${it.key}. Status ok: $uploaded")
println("Complete uploading of ${it.key}. Status ok: $uploaded")
}
}
}
api.repositories() ?.forEach {
if (it.state == "closed") {
println("Start uploading of ${it.key} with auto mode ")
val uploaded = api.upload(it.key, "automatic")
if (args.any { "--automatic" }) {
api.repositories()?.forEach {
if (it.state == "closed") {
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")
println("Complete uploading of ${it.key} with auto mode . Status ok: $uploaded")
}
}
}