Skip to content

Commit

Permalink
prepare sbt 2 (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k authored Oct 7, 2024
1 parent 328d026 commit 9eef843
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/scala/xerial/sbt/Sonatype.scala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object Sonatype extends AutoPlugin with LogSupport {
import autoImport.*
import complete.DefaultParsers.*

private implicit val ec = ExecutionContext.global
private implicit val ec: ExecutionContext = ExecutionContext.global

val sonatypeLegacy = "oss.sonatype.org"
val sonatype01 = "s01.oss.sonatype.org"
Expand Down Expand Up @@ -231,7 +231,7 @@ object Sonatype extends AutoPlugin with LogSupport {

private val sonatypeBundleRelease =
newCommand("sonatypeBundleRelease", "Upload a bundle in sonatypeBundleDirectory and release it at Sonatype") {
state: State =>
(state: State) =>
val extracted = Project.extract(state)
val credentialHost = extracted.get(sonatypeCredentialHost)

Expand All @@ -249,7 +249,7 @@ object Sonatype extends AutoPlugin with LogSupport {
}

private val sonatypeBundleUpload = newCommand("sonatypeBundleUpload", "Upload a bundle in sonatypeBundleDirectory") {
state: State =>
(state: State) =>
val extracted = Project.extract(state)
val bundlePath = extracted.get(sonatypeBundleDirectory)
withSonatypeService(state) { rest =>
Expand All @@ -265,7 +265,7 @@ object Sonatype extends AutoPlugin with LogSupport {
private val sonatypePrepare = newCommand(
"sonatypePrepare",
"Clean (if exists) and create a staging repository for releasing the current version, then update publishTo"
) { state: State =>
) { (state: State) =>
withSonatypeService(state) { rest =>
val repo = prepare(state, rest)
updatePublishSettings(state, repo)
Expand All @@ -275,7 +275,7 @@ object Sonatype extends AutoPlugin with LogSupport {
private val sonatypeOpen = newCommand(
"sonatypeOpen",
"Open (or create if not exists) to a staging repository for the current version, then update publishTo"
) { state: State =>
) { (state: State) =>
withSonatypeService(state) { rest =>
// Re-open or create a staging repository
val descriptionKey = Project.extract(state).get(sonatypeSessionName)
Expand Down Expand Up @@ -345,7 +345,7 @@ object Sonatype extends AutoPlugin with LogSupport {
}

private val sonatypeClean =
newCommand("sonatypeClean", "Clean a staging repository for the current version if it exists") { state: State =>
newCommand("sonatypeClean", "Clean a staging repository for the current version if it exists") { (state: State) =>
val extracted = Project.extract(state)
withSonatypeService(state) { rest =>
val descriptionKey = extracted.get(sonatypeSessionName)
Expand Down Expand Up @@ -379,7 +379,7 @@ object Sonatype extends AutoPlugin with LogSupport {
}
}

private val sonatypeLog = newCommand("sonatypeLog", "Show staging activity logs at Sonatype") { state: State =>
private val sonatypeLog = newCommand("sonatypeLog", "Show staging activity logs at Sonatype") { (state: State) =>
withSonatypeService(state) { rest =>
val alist = rest.activities
if (alist.isEmpty)
Expand All @@ -395,7 +395,7 @@ object Sonatype extends AutoPlugin with LogSupport {
}

private val sonatypeStagingRepositoryProfiles =
newCommand("sonatypeStagingRepositoryProfiles", "Show the list of staging repository profiles") { state: State =>
newCommand("sonatypeStagingRepositoryProfiles", "Show the list of staging repository profiles") { (state: State) =>
withSonatypeService(state) { rest =>
val repos = rest.stagingRepositoryProfiles()
if (repos.isEmpty)
Expand All @@ -409,7 +409,7 @@ object Sonatype extends AutoPlugin with LogSupport {
}

private val sonatypeStagingProfiles = newCommand("sonatypeStagingProfiles", "Show the list of staging profiles") {
state: State =>
(state: State) =>
withSonatypeService(state) { rest =>
val profiles = rest.stagingProfiles
if (profiles.isEmpty)
Expand Down

0 comments on commit 9eef843

Please sign in to comment.