Hey I have created a Groovy script that will extract the version numbers of some folder. I would then like to compare the version numbers and select the highest.
I g
Mine is the shortest! lol )
versions = versions.sort {a, b -> def a1 = a.tokenize('.')*.toInteger(), b1 = b.tokenize('.')*.toInteger() for (i in 0..<[a1.size(), b1.size()].min()) if (a1[i] != b1[i]) return a1[i] <=> b1[i] 0 }