Add test for `releaseNotesURL`

This commit is contained in:
Arman Bilge 2023-02-28 18:05:27 +00:00
parent ed29e35f41
commit 1a2b2467b4
2 changed files with 8 additions and 0 deletions

View File

@ -5,7 +5,9 @@ lazy val root = (project in file(".")) settings (
TaskKey[Unit]("checkPom") := checkPom.value,
TaskKey[Unit]("checkExtra") := checkExtra.value,
TaskKey[Unit]("checkVersionPlusMapping") := checkVersionPlusMapping.value,
TaskKey[Unit]("checkReleaseNotesURL") := checkReleaseNotesURL.value,
resolvers += Resolver.sonatypeRepo("snapshots"),
releaseNotesURL := Some(url("https://github.com/sbt/sbt/releases")),
makePomConfiguration := {
val p = makePomConfiguration.value
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 {
val pomXML = readPom.value
checkProject(pomXML)

View File

@ -1,3 +1,4 @@
> checkPom
> checkExtra
> checkVersionPlusMapping
> checkReleaseNotesURL