Skip to content

Commit

Permalink
Merge pull request #579 from disneystreaming/remove-version-override
Browse files Browse the repository at this point in the history
Remove version override for CE3
  • Loading branch information
Baccata authored Sep 16, 2022
2 parents 853de01 + b5f8454 commit 44cb2ab
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 44cb2ab

Please sign in to comment.