Skip to content

Commit 56de883

Browse files
authored
Fix terminal state (#149)
1 parent 8365b4f commit 56de883

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build-plugins/build-support/src/main/kotlin/aws/sdk/kotlin/gradle/publishing/SonatypeCentralPortalPublishTask.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ abstract class SonatypeCentralPortalPublishTask : DefaultTask() {
5555
val deploymentId = client.uploadBundle(file, file.name)
5656
logger.lifecycle("📤 Uploaded bundle; deploymentId=$deploymentId")
5757

58-
// 2) Wait for VALIDATED or FAILED
58+
// 2) Wait for PUBLISHING (which comes after VALIDATING) or FAILED
5959
val result = client.waitForStatus(
6060
deploymentId = deploymentId,
61-
terminalStates = setOf("VALIDATED", "FAILED"),
61+
terminalStates = setOf("PUBLISHING", "FAILED"),
6262
pollInterval = pollInterval.get(),
6363
timeout = timeoutDuration.get(),
6464
) { _, new ->
@@ -67,7 +67,7 @@ abstract class SonatypeCentralPortalPublishTask : DefaultTask() {
6767

6868
// 3) Evaluate
6969
when (result.deploymentState) {
70-
"VALIDATED" -> logger.lifecycle("✅ Bundle validated by Maven Central")
70+
"PUBLISHING" -> logger.lifecycle("✅ Bundle validated by Maven Central")
7171
"FAILED" -> {
7272
val reasons = result.errors?.values?.joinToString("\n- ", prefix = "\n- ")
7373
?: "\n(no error details returned)"

0 commit comments

Comments
 (0)