Skip to content

Commit a301bbb

Browse files
committed
Build: fix version sorting
Prevents us from incorrectly thinking the current version is the bwc version.
1 parent 160a049 commit a301bbb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/Version.groovy

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import groovy.transform.Sortable
2424
/**
2525
* Encapsulates comparison and printing logic for an x.y.z version.
2626
*/
27-
@Sortable
27+
@Sortable(includes=['id'])
2828
public class Version {
2929

3030
final int major
@@ -60,10 +60,6 @@ public class Version {
6060
return "${major}.${minor}.${bugfix}${snapshotStr}"
6161
}
6262

63-
public boolean equals(Version compareTo) {
64-
return id == compareTo.id
65-
}
66-
6763
public boolean before(String compareTo) {
6864
return id < fromString(compareTo).id
6965
}

0 commit comments

Comments
 (0)