one more improvement

This commit is contained in:
2025-06-02 11:47:38 +06:00
parent 05fd1c2b14
commit e3ea7be0e7
2 changed files with 13 additions and 2 deletions

View File

@@ -13,6 +13,8 @@ function assert_success() {
fi
}
assert_success ./uploadSonatypePublication.main.kts --drop
readarray -t projects <<< "`./gradlew getPublishableModules --quiet`"
for project in "${projects[@]}"; do
echo "Start publishing of $project"

View File

@@ -108,7 +108,16 @@ val api = CentralSonatypeOSSRHApi(
}
)
if (args.any { "--user_manager" }) {
if (args.contains("--drop")) {
api.repositories()?.forEach {
println("Start dropping of ${it.key}")
val uploaded = api.drop(it.key)
println("Complete dropping of ${it.key}. Status ok: $uploaded")
}
}
if (args.contains("--user_manager")) {
api.repositories()?.forEach {
if (it.state == "open") {
println("Start uploading of ${it.key}")
@@ -118,7 +127,7 @@ if (args.any { "--user_manager" }) {
}
}
}
if (args.any { "--automatic" }) {
if (args.contains("--automatic")) {
api.repositories()?.forEach {
if (it.state == "closed") {
println("Start uploading of ${it.key} with auto mode ")