Nightly setup

This commit is contained in:
Eugene Yokota 2020-11-14 12:31:34 -05:00
parent 3db3dff537
commit f8f9ed0c67
3 changed files with 24 additions and 14 deletions

View File

@ -7,15 +7,6 @@ val _ = {
sys.props += ("line.separator" -> "\n")
}
ThisBuild / version := {
val old = (ThisBuild / version).value
nightlyVersion match {
case Some(v) => v
case _ =>
if ((ThisBuild / isSnapshot).value) "1.4.0-SNAPSHOT"
else old
}
}
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / organization := "org.scala-sbt"
ThisBuild / bintrayPackage := "librarymanagement"
@ -375,11 +366,29 @@ def customCommands: Seq[Setting[_]] = Seq(
}
)
ThisBuild / version := {
val old = (ThisBuild / version).value
nightlyVersion match {
case Some(v) => v
case _ =>
if ((ThisBuild / isSnapshot).value) "1.4.0-SNAPSHOT"
else old
}
}
def githubPackageRegistry: Option[Resolver] =
sys.env.get("RELEASE_GITHUB_PACKAGE_REGISTRY") map { repo =>
s"GitHub Package Registry ($repo)" at s"https://maven.pkg.github.com/$repo"
}
ThisBuild / publishTo := {
val old = (ThisBuild / publishTo).value
sys.props.get("sbt.build.localmaven") match {
case Some(path) => Some(MavenCache("local-maven", file(path)))
case _ => old
githubPackageRegistry orElse old
}
ThisBuild / resolvers ++= githubPackageRegistry.toList
ThisBuild / credentials ++= {
sys.env.get("GITHUB_TOKEN") match {
case Some(token) =>
List(Credentials("GitHub Package Registry", "maven.pkg.github.com", "unused", token))
case _ => Nil
}
}

View File

@ -5,7 +5,8 @@ import sbt.contraband.ContrabandPlugin.autoImport._
object Dependencies {
val scala212 = "2.12.10"
def nightlyVersion: Option[String] = sys.props.get("sbt.build.version")
def nightlyVersion: Option[String] =
sys.env.get("BUILD_VERSION") orElse sys.props.get("sbt.build.version")
private val ioVersion = nightlyVersion.getOrElse("1.4.0")
private val utilVersion = nightlyVersion.getOrElse("1.4.0")

View File

@ -1 +1 @@
sbt.version=1.4.0-RC2
sbt.version=1.4.2