mirror of https://github.com/sbt/sbt.git
Fix bug in release script due to typo.
* Fix collection typo * Create shared command to setup 2.11 builds * Alter snapshot detection to allow more flexible milestone versioning. * Remove cusotm isSnapshot key for new sbt 0.13.2 isSnapshot key.
This commit is contained in:
parent
af70a895de
commit
ae02b495e6
|
|
@ -1,6 +1,6 @@
|
|||
import sbt._
|
||||
import Keys._
|
||||
import Status.{ isSnapshot, publishStatus }
|
||||
import Status.{ publishStatus }
|
||||
import com.typesafe.sbt.{ SbtGhPages, SbtGit, SbtSite, site => sbtsite }
|
||||
import SbtSite.{ site, SiteKeys }
|
||||
import SbtGhPages.{ ghpages, GhPagesKeys => ghkeys }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sbt._
|
||||
import Keys._
|
||||
import Status.{ isSnapshot, publishStatus }
|
||||
import Status.{ publishStatus }
|
||||
import org.apache.ivy.util.url.CredentialsStore
|
||||
|
||||
object Release extends Build {
|
||||
|
|
|
|||
|
|
@ -24,9 +24,13 @@ object Sbt extends Build {
|
|||
testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-w", "1"),
|
||||
javacOptions in compile ++= Seq("-target", "6", "-source", "6", "-Xlint", "-Xlint:-serial"),
|
||||
incOptions := incOptions.value.withNameHashing(true),
|
||||
commands += Command.command("checkBuildScala211") { state =>
|
||||
commands += Command.command("setupBuildScala211") { state =>
|
||||
"""set scalaVersion in ThisBuild := "2.11.0" """ ::
|
||||
"set Util.includeTestDependencies in ThisBuild := true" ::
|
||||
state
|
||||
},
|
||||
commands += Command.command("checkBuildScala211") { state =>
|
||||
"setupBuildScala211" ::
|
||||
// First compile everything before attempting to test
|
||||
"all compile test:compile" ::
|
||||
// Now run known working tests.
|
||||
|
|
@ -39,23 +43,22 @@ object Sbt extends Build {
|
|||
},
|
||||
// TODO - To some extent these should take args to figure out what to do.
|
||||
commands += Command.command("release-libs-211") { state =>
|
||||
def lameAgregateTask(task: String): String =
|
||||
s"all control/$task collectoins/$task io/$task"
|
||||
// TODO - Pull scala version from setting somewhere useful
|
||||
"++ 2.11.0" ::
|
||||
/// First test
|
||||
lameAgregateTask("test") ::
|
||||
// Note: You need the sbt-pgp plugin installed to release.
|
||||
lameAgregateTask("publishSigned") ::
|
||||
// Now restore the defaults.
|
||||
"reload" :: state
|
||||
def lameAgregateTask(task: String): String =
|
||||
s"all control/$task collections/$task io/$task"
|
||||
"setupBuildScala211" ::
|
||||
/// First test
|
||||
lameAgregateTask("test") ::
|
||||
// Note: You need the sbt-pgp plugin installed to release.
|
||||
lameAgregateTask("publishSigned") ::
|
||||
// Now restore the defaults.
|
||||
"reload" :: state
|
||||
},
|
||||
commands += Command.command("release-sbt") { state =>
|
||||
// TODO - Any sort of validation
|
||||
"publishSigned" ::
|
||||
"publishLauncher" ::
|
||||
"release-libs-211" ::
|
||||
state
|
||||
"publishSigned" ::
|
||||
"publishLauncher" ::
|
||||
"release-libs-211" ::
|
||||
state
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -85,13 +88,13 @@ object Sbt extends Build {
|
|||
|
||||
/* **** Utilities **** */
|
||||
|
||||
lazy val controlSub = baseProject(utilPath / "control", "Control") settings (Util.crossBuild:_*)
|
||||
lazy val collectionSub = testedBaseProject(utilPath / "collection", "Collections") settings (Util.keywordsSettings: _*) settings (Util.crossBuild:_*)
|
||||
lazy val controlSub = baseProject(utilPath / "control", "Control") settings (Util.crossBuild: _*)
|
||||
lazy val collectionSub = testedBaseProject(utilPath / "collection", "Collections") settings (Util.keywordsSettings: _*) settings (Util.crossBuild: _*)
|
||||
lazy val applyMacroSub = testedBaseProject(utilPath / "appmacro", "Apply Macro") dependsOn (collectionSub) settings (scalaCompiler)
|
||||
// The API for forking, combining, and doing I/O with system processes
|
||||
lazy val processSub = baseProject(utilPath / "process", "Process") dependsOn (ioSub % "test->test") settings (scalaXml)
|
||||
// Path, IO (formerly FileUtilities), NameFilter and other I/O utility classes
|
||||
lazy val ioSub = testedBaseProject(utilPath / "io", "IO") dependsOn (controlSub) settings (ioSettings: _*) settings (Util.crossBuild:_*)
|
||||
lazy val ioSub = testedBaseProject(utilPath / "io", "IO") dependsOn (controlSub) settings (ioSettings: _*) settings (Util.crossBuild: _*)
|
||||
// Utilities related to reflection, managing Scala versions, and custom class loaders
|
||||
lazy val classpathSub = testedBaseProject(utilPath / "classpath", "Classpath") dependsOn (launchInterfaceSub, interfaceSub, ioSub) settings (scalaCompiler)
|
||||
// Command line-related utilities.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import Keys._
|
|||
import java.util.regex.Pattern
|
||||
|
||||
object Status {
|
||||
lazy val isSnapshot = SettingKey[Boolean]("is-snapshot")
|
||||
lazy val publishStatus = SettingKey[String]("publish-status")
|
||||
|
||||
def settings: Seq[Setting[_]] = Seq(
|
||||
|
|
@ -25,5 +24,7 @@ object Status {
|
|||
format.format(new java.util.Date(time))
|
||||
}
|
||||
final val Snapshot = "-SNAPSHOT"
|
||||
def snapshotQualifier(v: String) = !Pattern.matches(""".+-(M|Alpha|Beta|RC)\d*""", v)
|
||||
// NOte: This moved into sbt itself... But we need to add semantic knowledge of how
|
||||
// we stamp our nightlies.
|
||||
def snapshotQualifier(v: String) = Pattern.matches(""".+-.*SNAPSHOT.*""", v)
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ object Transform {
|
|||
(ss --- sdirs) x (rebase(sdirs, sm) | flat(sm)) toSeq
|
||||
}
|
||||
def configSettings = transResourceSettings ++ seq(
|
||||
resourceProperties <<= (organization, version, scalaVersion, Status.isSnapshot) map { (org, v, sv, isSnapshot) =>
|
||||
resourceProperties <<= (organization, version, scalaVersion, isSnapshot) map { (org, v, sv, isSnapshot) =>
|
||||
Map("org" -> org, "sbt.version" -> v, "scala.version" -> sv, "repositories" -> repositories(isSnapshot).mkString(IO.Newline))
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ object Util {
|
|||
nightly211 <<= scalaVersion(_.startsWith("2.11.")),
|
||||
includeTestDependencies <<= nightly211(x => !x)
|
||||
)
|
||||
def crossBuild: Seq[Setting[_]] =
|
||||
def crossBuild: Seq[Setting[_]] =
|
||||
Seq(
|
||||
crossPaths := (scalaBinaryVersion.value match {
|
||||
case "2.11" => true
|
||||
case _ => false
|
||||
case _ => false
|
||||
})
|
||||
)
|
||||
def commonSettings(nameString: String) = Seq(
|
||||
|
|
|
|||
Loading…
Reference in New Issue