Skip to content

Commit

Permalink
Drop staging repositories after successful release
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylwester Zieliński committed Dec 21, 2023
1 parent cd4a2df commit 2027509
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,13 @@ open class ReleaseStagingRepositoriesTask : DefaultTask() {
if (!releaseResponse.isSuccessful) {
throw HttpException(releaseResponse)
}

Thread.sleep(120000) //Wait for the repository to close. Been too lazy to write retry mechanism.

val dropResponse = service.dropStagingRepositories(requestBody).execute()

if (!dropResponse.isSuccessful) {
throw HttpException(dropResponse)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ interface SonatypeService {

@POST("service/local/staging/bulk/promote")
fun releaseStagingRepositories(@Body body: StagingRepositoriesRequestBody): Call<Unit>

@POST("service/local/staging/bulk/drop")
fun dropStagingRepositories(@Body body: StagingRepositoriesRequestBody): Call<Unit>
}

0 comments on commit 2027509

Please sign in to comment.