diff --git a/build.sbt b/build.sbt index 6c0525d..02289bd 100644 --- a/build.sbt +++ b/build.sbt @@ -18,6 +18,7 @@ lazy val scalaLibraryNext = crossProject(JVMPlatform, JSPlatform) .jsEnablePlugins(ScalaJSJUnitPlugin) .settings( ScalaModulePlugin.scalaModuleSettings, + versionPolicyIntention := Compatibility.None, // TODO Change to `Compatibility.BinaryAndSourceCompatible` after the first release scalaModuleMimaPreviousVersion := None, scalacOptions ++= Seq("-deprecation", "-feature", "-Werror"), libraryDependencies ++= Seq( diff --git a/build.sh b/build.sh index 1cd603f..2d6763c 100755 --- a/build.sh +++ b/build.sh @@ -34,6 +34,7 @@ verPat="[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)?" tagPat="^v$verPat(#.*)?$" if [[ "$TRAVIS_TAG" =~ $tagPat ]]; then + versionCheckTask="versionCheck" releaseTask="ci-release" if ! isReleaseJob; then echo "Not releasing on Java $ADOPTOPENJDK with Scala $TRAVIS_SCALA_VERSION" @@ -50,4 +51,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 versionPolicyCheck ${projectPrefix}publishLocal $versionCheckTask $releaseTask diff --git a/project/plugins.sbt b/project/plugins.sbt index e53f281..861ee25 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,4 @@ addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.2.4") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.6.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") +addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "1.0.1")