From 88ba8f23490f0493297a0b1b2f4a294caa5f1b28 Mon Sep 17 00:00:00 2001 From: Philippus Date: Wed, 17 Mar 2021 22:46:51 +0100 Subject: [PATCH 1/2] Declare versionScheme and add sbt-version-policy --- build.sbt | 4 +++- build.sh | 2 +- project/plugins.sbt | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index d0e210e8..503ae4ac 100644 --- a/build.sbt +++ b/build.sbt @@ -2,6 +2,8 @@ lazy val root = project.in(file(".")) .aggregate(parserCombinatorsJVM, parserCombinatorsJS, parserCombinatorsNative) .settings( publish / skip := true, + ThisBuild / versionScheme := Some("early-semver"), + ThisBuild / versionPolicyIntention := Compatibility.BinaryAndSourceCompatible ) lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatform) @@ -9,7 +11,7 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor .settings( ScalaModulePlugin.scalaModuleSettings, name := "scala-parser-combinators", - scalaModuleMimaPreviousVersion := None, // until we publish 1.2.0 + scalaModuleMimaPreviousVersion := Some("1.2.0-M2"), libraryDependencies += "junit" % "junit" % "4.13.2" % Test, libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test, diff --git a/build.sh b/build.sh index 8a1dde8c..4aa5cd2e 100755 --- a/build.sh +++ b/build.sh @@ -53,4 +53,4 @@ export CI_SNAPSHOT_RELEASE="${projectPrefix}publish" # for now, until we're confident in the new release scripts, just close the staging repo. export CI_SONATYPE_RELEASE="; sonatypePrepare; sonatypeBundleUpload; sonatypeClose" -sbt clean ${projectPrefix}test ${projectPrefix}publishLocal $releaseTask +sbt clean ${projectPrefix}test ${projectPrefix}versionPolicyCheck ${projectPrefix}publishLocal $releaseTask diff --git a/project/plugins.sbt b/project/plugins.sbt index 808b305e..2d8f1468 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -12,4 +12,5 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.0.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % scalaNativeVersion) +addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.0-RC5") addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3") From d59923bdf9793ce7fe27c5d3a287ccc9b6860910 Mon Sep 17 00:00:00 2001 From: Seth Tisue Date: Mon, 29 Mar 2021 13:03:37 -0700 Subject: [PATCH 2/2] disable MiMa for now on Scala 3 --- build.sbt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 503ae4ac..ae08a188 100644 --- a/build.sbt +++ b/build.sbt @@ -11,7 +11,11 @@ lazy val parserCombinators = crossProject(JVMPlatform, JSPlatform, NativePlatfor .settings( ScalaModulePlugin.scalaModuleSettings, name := "scala-parser-combinators", - scalaModuleMimaPreviousVersion := Some("1.2.0-M2"), + scalaModuleMimaPreviousVersion := (CrossVersion.partialVersion(scalaVersion.value) match { + // pending resolution of https://github.com/scalacenter/sbt-version-policy/issues/62 + case Some((3, _)) => None + case _ => Some("1.2.0-M2") + }), libraryDependencies += "junit" % "junit" % "4.13.2" % Test, libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,