mirror of https://github.com/sbt/sbt.git
Add test for `releaseNotesURL`
This commit is contained in:
parent
ed29e35f41
commit
1a2b2467b4
|
|
@ -5,7 +5,9 @@ lazy val root = (project in file(".")) settings (
|
||||||
TaskKey[Unit]("checkPom") := checkPom.value,
|
TaskKey[Unit]("checkPom") := checkPom.value,
|
||||||
TaskKey[Unit]("checkExtra") := checkExtra.value,
|
TaskKey[Unit]("checkExtra") := checkExtra.value,
|
||||||
TaskKey[Unit]("checkVersionPlusMapping") := checkVersionPlusMapping.value,
|
TaskKey[Unit]("checkVersionPlusMapping") := checkVersionPlusMapping.value,
|
||||||
|
TaskKey[Unit]("checkReleaseNotesURL") := checkReleaseNotesURL.value,
|
||||||
resolvers += Resolver.sonatypeRepo("snapshots"),
|
resolvers += Resolver.sonatypeRepo("snapshots"),
|
||||||
|
releaseNotesURL := Some(url("https://github.com/sbt/sbt/releases")),
|
||||||
makePomConfiguration := {
|
makePomConfiguration := {
|
||||||
val p = makePomConfiguration.value
|
val p = makePomConfiguration.value
|
||||||
p.withExtra(<extra-tag/>)
|
p.withExtra(<extra-tag/>)
|
||||||
|
|
@ -46,6 +48,11 @@ lazy val checkVersionPlusMapping = (readPom) map { (pomXml) =>
|
||||||
()
|
()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lazy val checkReleaseNotesURL = (readPom) map { (pomXml) =>
|
||||||
|
val notes = pomXml \ "properties" \ "info.releaseNotesUrl"
|
||||||
|
if (notes.isEmpty) sys.error("'releaseNotesUrl' not found in generated pom.xml.") else ()
|
||||||
|
}
|
||||||
|
|
||||||
lazy val checkPom = Def task {
|
lazy val checkPom = Def task {
|
||||||
val pomXML = readPom.value
|
val pomXML = readPom.value
|
||||||
checkProject(pomXML)
|
checkProject(pomXML)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
> checkPom
|
> checkPom
|
||||||
> checkExtra
|
> checkExtra
|
||||||
> checkVersionPlusMapping
|
> checkVersionPlusMapping
|
||||||
|
> checkReleaseNotesURL
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue