Merge pull request #1350 from sbt/wip/fix-release-scripts

Fix bug in release script due to typo.
This commit is contained in:
eugene yokota 2014-06-02 14:36:33 -04:00
commit aa28240139
5 changed files with 19 additions and 15 deletions

View File

@ -1,6 +1,6 @@
import sbt._ import sbt._
import Keys._ import Keys._
import Status.{ isSnapshot, publishStatus } import Status.{ publishStatus }
import com.typesafe.sbt.{ SbtGhPages, SbtGit, SbtSite, site => sbtsite } import com.typesafe.sbt.{ SbtGhPages, SbtGit, SbtSite, site => sbtsite }
import SbtSite.{ site, SiteKeys } import SbtSite.{ site, SiteKeys }
import SbtGhPages.{ ghpages, GhPagesKeys => ghkeys } import SbtGhPages.{ ghpages, GhPagesKeys => ghkeys }

View File

@ -1,6 +1,6 @@
import sbt._ import sbt._
import Keys._ import Keys._
import Status.{ isSnapshot, publishStatus } import Status.{ publishStatus }
import org.apache.ivy.util.url.CredentialsStore import org.apache.ivy.util.url.CredentialsStore
object Release extends Build { object Release extends Build {

View File

@ -24,9 +24,13 @@ object Sbt extends Build {
testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-w", "1"), testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-w", "1"),
javacOptions in compile ++= Seq("-target", "6", "-source", "6", "-Xlint", "-Xlint:-serial"), javacOptions in compile ++= Seq("-target", "6", "-source", "6", "-Xlint", "-Xlint:-serial"),
incOptions := incOptions.value.withNameHashing(true), incOptions := incOptions.value.withNameHashing(true),
commands += Command.command("checkBuildScala211") { state => commands += Command.command("setupBuildScala211") { state =>
"""set scalaVersion in ThisBuild := "2.11.0" """ :: """set scalaVersion in ThisBuild := "2.11.0" """ ::
"set Util.includeTestDependencies in ThisBuild := true" :: "set Util.includeTestDependencies in ThisBuild := true" ::
state
},
commands += Command.command("checkBuildScala211") { state =>
"setupBuildScala211" ::
// First compile everything before attempting to test // First compile everything before attempting to test
"all compile test:compile" :: "all compile test:compile" ::
// Now run known working tests. // Now run known working tests.
@ -40,15 +44,14 @@ object Sbt extends Build {
// TODO - To some extent these should take args to figure out what to do. // TODO - To some extent these should take args to figure out what to do.
commands += Command.command("release-libs-211") { state => commands += Command.command("release-libs-211") { state =>
def lameAgregateTask(task: String): String = def lameAgregateTask(task: String): String =
s"all control/$task collectoins/$task io/$task" s"all control/$task collections/$task io/$task completion/$task"
// TODO - Pull scala version from setting somewhere useful "setupBuildScala211" ::
"++ 2.11.0" :: /// First test
/// First test lameAgregateTask("test") ::
lameAgregateTask("test") :: // Note: You need the sbt-pgp plugin installed to release.
// Note: You need the sbt-pgp plugin installed to release. lameAgregateTask("publishSigned") ::
lameAgregateTask("publishSigned") :: // Now restore the defaults.
// Now restore the defaults. "reload" :: state
"reload" :: state
}, },
commands += Command.command("release-sbt") { state => commands += Command.command("release-sbt") { state =>
// TODO - Any sort of validation // TODO - Any sort of validation

View File

@ -3,7 +3,6 @@ import Keys._
import java.util.regex.Pattern import java.util.regex.Pattern
object Status { object Status {
lazy val isSnapshot = SettingKey[Boolean]("is-snapshot")
lazy val publishStatus = SettingKey[String]("publish-status") lazy val publishStatus = SettingKey[String]("publish-status")
def settings: Seq[Setting[_]] = Seq( def settings: Seq[Setting[_]] = Seq(
@ -25,5 +24,7 @@ object Status {
format.format(new java.util.Date(time)) format.format(new java.util.Date(time))
} }
final val Snapshot = "-SNAPSHOT" 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)
} }

View File

@ -59,7 +59,7 @@ object Transform {
(ss --- sdirs) x (rebase(sdirs, sm) | flat(sm)) toSeq (ss --- sdirs) x (rebase(sdirs, sm) | flat(sm)) toSeq
} }
def configSettings = transResourceSettings ++ seq( 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)) Map("org" -> org, "sbt.version" -> v, "scala.version" -> sv, "repositories" -> repositories(isSnapshot).mkString(IO.Newline))
} }
) )