MAJOR,MINOR,REVISION,BUILD
}
-class KernelVersion implements Comparable<KernelVersion> {
+class BasicVersion implements Comparable<BasicVersion> {
int major = -1
int minor = -1
int revision = -1
String gitRefs
// Default Constructor
- KernelVersion() {}
+ BasicVersion() {}
- // Parse a version string of format X,Y,Z,W-A
- KernelVersion(String version, String ref) {
+ // Parse a version string of format X.Y.Z.W-A
+ BasicVersion(String version, String ref) {
gitRefs = ref
def tokenVersion
def token
// Release canditate
token = version.tokenize('-')
tokenVersion = token[0]
- if (token[1].isInteger()) {
+ if (token[1]?.isInteger()) {
rc = token[1].toInteger()
}
} else {
def tagEnum = KernelVersioning.MAJOR
tokenVersion.each {
- if (it.isInteger()) {
+ if (it?.isInteger()) {
switch (tagEnum) {
case KernelVersioning.MAJOR:
major = it.toInteger()
println("Unsupported version extension")
println("Trying to parse: ${version}")
println("Invalid sub version value: ${it}")
- //TODO: throw exception for jenkins
+ //TODO: throw exception for jenkins
}
}
}
}
-
String print() {
String ret = ""
if (major != -1) {
}
@Override
- int compareTo(KernelVersion kernelVersion) {
+ int compareTo(BasicVersion kernelVersion) {
return major <=> kernelVersion.major ?: minor <=> kernelVersion.minor ?: revision <=> kernelVersion.revision ?: build <=> kernelVersion.build ?: rc <=> kernelVersion.rc
}
}
-def cutoff = [major: 3, minor: 19,revision:-1, build:-1, rc:-1]
+def cutoff = new BasicVersion("3.19", "")
+def modulesBranches = ["master","stable-2.5.0","stable-2.6.0"]
def linuxURL = "git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"
def modulesURL = "git://git.lttng.org/lttng-modules.git"