mirror of https://github.com/sbt/sbt.git
implement `skip in publish`
`skip in publish` when set to `true` will skip publish, publishLocal, and publishM2. (sbt-pgp already skips publishSigned). Fixes sbt/sbt#3136
This commit is contained in:
parent
c9f9f5ca3c
commit
5e8bbf8d0d
|
|
@ -2159,16 +2159,26 @@ object Classpaths {
|
|||
classifiers.toVector
|
||||
)
|
||||
}
|
||||
|
||||
def deliverTask(config: TaskKey[PublishConfiguration]): Initialize[Task[File]] =
|
||||
Def.task {
|
||||
val _ = update.value
|
||||
IvyActions.deliver(ivyModule.value, config.value, streams.value.log)
|
||||
}
|
||||
|
||||
def publishTask(config: TaskKey[PublishConfiguration],
|
||||
deliverKey: TaskKey[_]): Initialize[Task[Unit]] =
|
||||
Def.task {
|
||||
IvyActions.publish(ivyModule.value, config.value, streams.value.log)
|
||||
Def.taskDyn {
|
||||
val s = streams.value
|
||||
val skp = (skip in publish).value
|
||||
val ref = thisProjectRef.value
|
||||
if (skp) Def.task { s.log.debug(s"Skipping publish* for ${ref.project}") }
|
||||
else Def.task {
|
||||
val cfg = config.value
|
||||
IvyActions.publish(ivyModule.value, config.value, s.log)
|
||||
}
|
||||
} tag (Tags.Publish, Tags.Network)
|
||||
|
||||
val moduleIdJsonKeyFormat: sjsonnew.JsonKeyFormat[ModuleID] =
|
||||
new sjsonnew.JsonKeyFormat[ModuleID] {
|
||||
import sjsonnew.support.scalajson.unsafe._
|
||||
|
|
|
|||
Loading…
Reference in New Issue