Skip to content

Commit

Permalink
Remove version override for CE3
Browse files Browse the repository at this point in the history
  • Loading branch information
Baccata committed Sep 16, 2022
1 parent 853de01 commit b5f8454
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions project/WeaverPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,8 @@ object WeaverPlugin extends AutoPlugin {
if (platform == VirtualAxis.native) configureScalaNativeProject
else identity

val ce3VersionOverride: Configure =
_.settings(versionOverrideForCE3)

val configureProject =
addScalafix andThen addScalafmt andThen scalaJSSettings andThen scalaNativeSettings andThen ce3VersionOverride
addScalafix andThen addScalafmt andThen scalaJSSettings andThen scalaNativeSettings

projectMatrix.defaultAxes(defaults: _*).customRow(
scalaVersions = List(scalaVersion),
Expand Down Expand Up @@ -98,26 +95,6 @@ object WeaverPlugin extends AutoPlugin {

}

lazy val versionOverrideForCE3: Seq[Def.Setting[_]] = Seq(
version := {
val regex = "^(\\d+).(\\d+).(\\d+).*$".r

val original = version.value

original match {
case regex(major, minor, patch) =>
if (minor == "6")
original.replaceFirst(s"$major.$minor.$patch",
s"$major.${minor.toInt + 1}.$patch")
else
original
case _ =>
throw new RuntimeException(
s"Version $original doesn't match SemVer format")
}
}
)

def configureScalaJSProject(proj: Project): Project = {

val linkerConfig = Seq(Test / scalaJSLinkerConfig ~= {
Expand Down

0 comments on commit b5f8454

Please sign in to comment.