Merge pull request #5106 from eed3si9n/wip/1.3.1

[1.3.x] clear banner + bump IO
This commit is contained in:
eugene yokota 2019-09-19 21:19:48 -04:00 committed by GitHub
commit 3ca185fe30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 12 deletions

View File

@ -977,7 +977,9 @@ object BuiltinCommands {
val skipFile = skipWelcomeFile(state, version)
Files.createDirectories(skipFile.getParent)
val suppress = !SysProp.banner || Files.exists(skipFile)
if (!suppress) state.log.info(Banner(version))
if (!suppress) {
Banner(version).foreach(banner => state.log.info(banner))
}
} catch { case _: IOException => /* Don't let errors in this command prevent startup */ }
state.put(bannerHasBeenShown, true)
} else state

View File

@ -8,14 +8,18 @@
package sbt.internal
private[sbt] object Banner {
def apply(version: String): String =
s"""
|Welcome to sbt $version.
|Here are some highlights of this release:
| - Coursier: new default library management using https://get-coursier.io
| - Super shell: displays actively running tasks
| - Turbo mode: makes `test` and `run` faster in interactive sessions. Try it by running `set ThisBuild / turbo := true`.
|See https://www.lightbend.com/blog/sbt-1.3.0-release for full release notes.
|Hide the banner for this release by running `skipBanner`.
|""".stripMargin.linesIterator.filter(_.nonEmpty).mkString("\n")
def apply(version: String): Option[String] =
version match {
case "1.3.0" =>
Some(s"""
|Welcome to sbt $version.
|Here are some highlights of this release:
| - Coursier: new default library management using https://get-coursier.io
| - Super shell: displays actively running tasks
| - Turbo mode: makes `test` and `run` faster in interactive sessions. Try it by running `set ThisBuild / turbo := true`.
|See https://www.lightbend.com/blog/sbt-1.3.0-release for full release notes.
|Hide the banner for this release by running `skipBanner`.
|""".stripMargin.linesIterator.filter(_.nonEmpty).mkString("\n"))
case _ => None
}
}

View File

@ -10,7 +10,7 @@ object Dependencies {
def nightlyVersion: Option[String] = sys.props.get("sbt.build.version")
// sbt modules
private val ioVersion = nightlyVersion.getOrElse("1.3.0")
private val ioVersion = nightlyVersion.getOrElse("1.3.1")
private val utilVersion = nightlyVersion.getOrElse("1.3.0")
private val lmVersion =
sys.props.get("sbt.build.lm.version") match {