File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
src/main/scala/com/github/sbt/git Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ git.baseVersion := "1.0"
15
15
16
16
libraryDependencies ++= Seq (
17
17
" org.eclipse.jgit" % " org.eclipse.jgit" % " 5.13.3.202401111512-r" ,
18
- " com.michaelpollmeier " % " versionsort " % " 1.0.11 " ,
19
- " org.scalameta" %% " munit" % " 1.0.1" % Test
18
+ " com.github.zafarkhaja " % " java-semver " % " 0.10.2 " ,
19
+ " org.scalameta" %% " munit" % " 1.0.1" % Test ,
20
20
)
21
21
22
22
scriptedLaunchOpts += s " -Dproject.version= ${version.value}"
Original file line number Diff line number Diff line change 1
1
package com .github .sbt .git
2
2
3
- import sbt ._
4
- import Keys ._
3
+ import sbt .*
4
+ import Keys .*
5
+ import com .github .zafarkhaja .semver .Version
6
+
5
7
import sys .process .Process
6
8
7
9
/** This plugin has all the basic 'git' functionality for other plugins. */
@@ -299,7 +301,12 @@ object SbtGit {
299
301
} yield version
300
302
301
303
// NOTE - Selecting the last tag or the first tag should be an option.
302
- val highestVersion = versions.sortWith { versionsort.VersionHelper .compare(_, _) > 0 }.headOption
304
+ val highestVersion =
305
+ versions
306
+ .map(Version .parse)
307
+ .sortWith(_.compareTo(_) > 0 )
308
+ .headOption
309
+
303
310
highestVersion.map(_ + suffix)
304
311
}
305
312
You can’t perform that action at this time.
0 commit comments