diff --git a/build.sbt b/build.sbt index 269a4be..9f310f1 100644 --- a/build.sbt +++ b/build.sbt @@ -18,7 +18,7 @@ git.baseVersion := "1.0" libraryDependencies ++= Seq( "org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.3.202401111512-r", - "com.michaelpollmeier" % "versionsort" % "1.0.17", + "com.github.zafarkhaja" % "java-semver" % "0.10.2", "org.scalameta" %% "munit" % "1.1.1" % Test ) diff --git a/src/main/scala/com/github/sbt/git/GitPlugin.scala b/src/main/scala/com/github/sbt/git/GitPlugin.scala index fe763d7..a5ab3fb 100644 --- a/src/main/scala/com/github/sbt/git/GitPlugin.scala +++ b/src/main/scala/com/github/sbt/git/GitPlugin.scala @@ -3,6 +3,7 @@ package com.github.sbt.git import sbt.* import Keys.* + /** This plugin has all the basic 'git' functionality for other plugins. */ object SbtGit { @@ -317,7 +318,12 @@ object SbtGit { } yield version // NOTE - Selecting the last tag or the first tag should be an option. - val highestVersion = versions.sortWith { versionsort.VersionHelper.compare(_, _) > 0 }.headOption + val highestVersion = + versions + .map(Version.parse) + .sortWith(_.compareTo(_) > 0) + .headOption + highestVersion.map(_ + suffix) } diff --git a/test-project/project/build.properties b/test-project/project/build.properties index 8b697bb..ee4c672 100644 --- a/test-project/project/build.properties +++ b/test-project/project/build.properties @@ -1 +1 @@ -sbt.version=1.1.0 +sbt.version=1.10.1