@@ -6,6 +6,7 @@ import com.lumidion.sonatype.central.client.core.{PublishingType, SonatypeCreden
6
6
import settings .{PublishLocalNoFluff , workspaceDirName }
7
7
import de .tobiasroeser .mill .vcs .version ._
8
8
import mill ._
9
+ import mill .javalib .publish .Artifact
9
10
import scalalib ._
10
11
import org .eclipse .jgit .api .Git
11
12
@@ -166,20 +167,23 @@ def publishSonatype(
166
167
val pgpPassword = sys.env(" PGP_PASSWORD" )
167
168
val timeout = 10 .minutes
168
169
169
- val artifacts = data.map {
170
+ System .err.println(" Actual artifacts included in the bundle:" )
171
+ val artifacts : Seq [(Seq [(os.Path , String )], Artifact )] = data.map {
170
172
case PublishModule .PublishData (a, s) =>
173
+ System .err.println(s " ${a.group}: ${a.id}: ${a.version}" )
171
174
(s.map { case (p, f) => (p.path, f) }, a)
172
175
}
173
176
174
177
val isRelease : Boolean = {
175
- val versions = artifacts.map(_._2.version).toSet
176
- val set = versions.map(! _.endsWith(" -SNAPSHOT" ))
178
+ val versions : Set [ String ] = artifacts.map(_._2.version).toSet
179
+ val set : Set [ Boolean ] = versions.map(! _.endsWith(" -SNAPSHOT" ))
177
180
assert(
178
181
set.size == 1 ,
179
182
s " Found both snapshot and non-snapshot versions: ${versions.toVector.sorted.mkString(" , " )}"
180
183
)
181
184
set.head
182
185
}
186
+ System .err.println(s " Is release: $isRelease" )
183
187
val publisher = new SonatypeCentralPublisher (
184
188
credentials = credentials,
185
189
gpgArgs = Seq (
@@ -200,8 +204,10 @@ def publishSonatype(
200
204
env = env,
201
205
awaitTimeout = timeout.toMillis.toInt
202
206
)
203
- val publishingType = if (isRelease) PublishingType .AUTOMATIC else PublishingType .USER_MANAGED
207
+ val publishingType = if (isRelease) PublishingType .AUTOMATIC else PublishingType .USER_MANAGED
208
+ System .err.println(s " Publishing type: $publishingType" )
204
209
val finalBundleName = if (bundleName.nonEmpty) Some (bundleName) else None
210
+ System .err.println(s " Final bundle name: $finalBundleName" )
205
211
publisher.publishAll(
206
212
publishingType = publishingType,
207
213
singleBundleName = finalBundleName,
0 commit comments