mirror of https://github.com/sbt/sbt.git
Warn on missing versionScheme
Fixes https://github.com/sbt/sbt/issues/6303 This will print warning on publishing when versionScheme is not set. ``` [warn] versionScheme setting is empty; set `ThisBuild / versionScheme := Some("early-semver")` or `Some("pvp")` [warn] so tooling can use it for evction errors etc - https://www.scala-sbt.org/1.x/docs/Publishing.html ```
This commit is contained in:
parent
da4e1d3711
commit
9cde1dfcaa
|
|
@ -3045,6 +3045,14 @@ object Classpaths {
|
|||
)
|
||||
},
|
||||
publishConfiguration := {
|
||||
val s = streams.value
|
||||
val vs = versionScheme.value
|
||||
if (vs.isEmpty)
|
||||
s.log.warn(
|
||||
s"""versionScheme setting is empty; set `ThisBuild / versionScheme := Some("early-semver")` or `Some("pvp")`
|
||||
|so tooling can use it for evction errors etc - https://www.scala-sbt.org/1.x/docs/Publishing.html""".stripMargin
|
||||
)
|
||||
else ()
|
||||
publishConfig(
|
||||
publishMavenStyle.value,
|
||||
deliverPattern(crossTarget.value),
|
||||
|
|
|
|||
Loading…
Reference in New Issue