Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new better release settings #2732

Merged
merged 4 commits into from
Feb 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import sbtcrossproject.CrossProject
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

lazy val scoverageSettings = Seq(
coverageEnabled := {
if (priorTo2_13(scalaVersion.value))
coverageEnabled.value
else
false
},
coverageMinimum := 60,
coverageFailOnMinimum := false,
coverageHighlighting := true
Expand All @@ -26,12 +32,6 @@ lazy val commonSettings = Seq(
case _ => Nil
}
},
coverageEnabled := {
if (priorTo2_13(scalaVersion.value))
coverageEnabled.value
else
false
},
resolvers ++= Seq(Resolver.sonatypeRepo("releases"), Resolver.sonatypeRepo("snapshots")),
parallelExecution in Test := false,
scalacOptions in (Compile, doc) := (scalacOptions in (Compile, doc)).value.filter(_ != "-Xfatal-warnings"),
Expand Down Expand Up @@ -389,9 +389,9 @@ lazy val docs = project

lazy val cats = project
.in(file("."))
.settings(moduleName := "root")
.settings(catsSettings)
.settings(noPublishSettings)
.settings(moduleName := "root", crossScalaVersions := Nil)
.settings(publishSettings) // these settings are needed to release all aggregated modules under this root module
.settings(noPublishSettings) // this is to exclue the root module itself from being published.
.aggregate(catsJVM, catsJS)
.dependsOn(catsJVM, catsJS, tests.jvm % "test-internal -> test")

Expand Down Expand Up @@ -804,9 +804,7 @@ def priorTo2_13(scalaVersion: String): Boolean =
}

lazy val sharedPublishSettings = Seq(
releaseCrossBuild := true,
releaseTagName := tagName.value,
releasePublishArtifactsAction := PgpKeys.publishSigned.value,
releaseVcsSign := true,
useGpg := true, // bouncycastle has bugs with subkeys, so we use gpg instead
publishMavenStyle := true,
Expand All @@ -825,12 +823,11 @@ lazy val sharedReleaseProcess = Seq(
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
releaseStepCommand("validate"),
releaseStepCommandAndRemaining("+validate"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a switch from running validate from the current version to all versions? If so, does this lead to OOMs or anything?

Copy link
Contributor Author

@kailuowang kailuowang Feb 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. Before the validate is still run against all scala versions because the crossScalaVersions settings on the root module and the releaseCrossBuild := true. sbt release automatically runs certain steps on each modules against all crossScalaVersions set on the root module. Now, with the new sbt version , the +validate will performe on each aggregated module correctly on their own crossScalaVersions. The root module's crossScalaVersions should set as Nil, otherwise it will conflict with the aggregrated module's crossScalaVersion.

setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
releaseStepCommandAndRemaining("+publishSigned"),
setNextVersion,
commitNextVersion,
releaseStepCommand("sonatypeReleaseAll"),
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.7
sbt.version=1.2.8