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]("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]("checkAPIURL") := checkAPIURL.value,
|
||||||
TaskKey[Unit]("checkReleaseNotesURL") := checkReleaseNotesURL.value,
|
TaskKey[Unit]("checkReleaseNotesURL") := checkReleaseNotesURL.value,
|
||||||
resolvers += Resolver.sonatypeRepo("snapshots"),
|
resolvers += Resolver.sonatypeRepo("snapshots"),
|
||||||
|
apiURL := Some(url("https://www.scala-sbt.org/1.x/api/")),
|
||||||
releaseNotesURL := Some(url("https://github.com/sbt/sbt/releases")),
|
releaseNotesURL := Some(url("https://github.com/sbt/sbt/releases")),
|
||||||
makePomConfiguration := {
|
makePomConfiguration := {
|
||||||
val p = makePomConfiguration.value
|
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) =>
|
lazy val checkReleaseNotesURL = (readPom) map { (pomXml) =>
|
||||||
val notes = pomXml \ "properties" \ "info.releaseNotesUrl"
|
val notes = pomXml \ "properties" \ "info.releaseNotesUrl"
|
||||||
if (notes.isEmpty) sys.error("'releaseNotesUrl' not found in generated pom.xml.") else ()
|
if (notes.isEmpty) sys.error("'releaseNotesUrl' not found in generated pom.xml.") else ()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
> checkPom
|
> checkPom
|
||||||
> checkExtra
|
> checkExtra
|
||||||
> checkVersionPlusMapping
|
> checkVersionPlusMapping
|
||||||
|
> checkAPIURL
|
||||||
> checkReleaseNotesURL
|
> checkReleaseNotesURL
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue