mirror of https://github.com/apache/lucene.git
LUCENE-9301: include build time and user name only in non-snapshot builds so that jars are not recompiled on each build in development.
This commit is contained in:
parent
1dda684876
commit
da3dbb1921
|
@ -54,6 +54,8 @@ ext {
|
||||||
}
|
}
|
||||||
return m[0][1] as int
|
return m[0][1] as int
|
||||||
}
|
}
|
||||||
|
// snapshot build marker used in scripts.
|
||||||
|
snapshotBuild = version.contains("SNAPSHOT")
|
||||||
|
|
||||||
// Build timestamp.
|
// Build timestamp.
|
||||||
def tstamp = ZonedDateTime.now()
|
def tstamp = ZonedDateTime.now()
|
||||||
|
|
|
@ -48,7 +48,14 @@ allprojects {
|
||||||
// awkward on import and resolves provider properties even though task dependencies
|
// awkward on import and resolves provider properties even though task dependencies
|
||||||
// have not been run yet?
|
// have not been run yet?
|
||||||
def gitRev = rootProject.hasProperty("gitRev") ? rootProject.gitRev : ""
|
def gitRev = rootProject.hasProperty("gitRev") ? rootProject.gitRev : ""
|
||||||
"${project.version} ${gitRev} - ${System.properties['user.name']} - ${buildDate} ${buildTime}"
|
|
||||||
|
// For snapshot builds just include the project version and gitRev so that
|
||||||
|
// JARs don't need to be recompiled just because the manifest has changed.
|
||||||
|
if (snapshotBuild) {
|
||||||
|
return "${project.version} ${gitRev} [snapshot build, details omitted]"
|
||||||
|
} else {
|
||||||
|
return "${project.version} ${gitRev} - ${System.properties['user.name']} - ${buildDate} ${buildTime}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
manifest {
|
manifest {
|
||||||
|
|
Loading…
Reference in New Issue