mirror of https://github.com/sbt/sbt.git
Add test for `apiURL`
This commit is contained in:
parent
1a2b2467b4
commit
414c3a4358
|
|
@ -5,8 +5,10 @@ lazy val root = (project in file(".")) settings (
|
|||
TaskKey[Unit]("checkPom") := checkPom.value,
|
||||
TaskKey[Unit]("checkExtra") := checkExtra.value,
|
||||
TaskKey[Unit]("checkVersionPlusMapping") := checkVersionPlusMapping.value,
|
||||
TaskKey[Unit]("checkAPIURL") := checkAPIURL.value,
|
||||
TaskKey[Unit]("checkReleaseNotesURL") := checkReleaseNotesURL.value,
|
||||
resolvers += Resolver.sonatypeRepo("snapshots"),
|
||||
apiURL := Some(url("https://www.scala-sbt.org/1.x/api/")),
|
||||
releaseNotesURL := Some(url("https://github.com/sbt/sbt/releases")),
|
||||
makePomConfiguration := {
|
||||
val p = makePomConfiguration.value
|
||||
|
|
@ -48,6 +50,11 @@ lazy val checkVersionPlusMapping = (readPom) map { (pomXml) =>
|
|||
()
|
||||
}
|
||||
|
||||
lazy val checkAPIURL = (readPom) map { (pomXml) =>
|
||||
val notes = pomXml \ "properties" \ "info.apiURL"
|
||||
if (notes.isEmpty) sys.error("'apiURL' not found in generated pom.xml.") else ()
|
||||
}
|
||||
|
||||
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 ()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
> checkPom
|
||||
> checkExtra
|
||||
> checkVersionPlusMapping
|
||||
> checkAPIURL
|
||||
> checkReleaseNotesURL
|
||||
|
|
|
|||
Loading…
Reference in New Issue