Skip to content

Commit

Permalink
chore(scancode): Remove a work-around for old RC versions
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <[email protected]>
  • Loading branch information
sschuberth committed Nov 18, 2024
1 parent 76fd3e3 commit 2d25785
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions plugins/scanners/scancode/src/main/kotlin/ScanCode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,6 @@ class ScanCode internal constructor(
override fun command(workingDir: File?) =
listOfNotNull(workingDir, if (Os.isWindows) "scancode.bat" else "scancode").joinToString(File.separator)

override fun getVersion(workingDir: File?): String =
// The release candidate version names lack a hyphen in between the minor version and the extension, e.g.
// 3.2.1rc2. Insert that hyphen for compatibility with Semver.
super.getVersion(workingDir).let {
val index = it.indexOf("rc")
if (index != -1) {
"${it.substring(0, index)}-${it.substring(index)}"
} else {
it
}
}

override fun getVersionRequirement(): RangesList = RangesListFactory.create(">=30.0.0")

override fun transformVersion(output: String): String {
Expand Down

0 comments on commit 2d25785

Please sign in to comment.