You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2020/06/01 08:09:52 UTC
[lucene-solr] branch master updated: 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 is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new da3dbb1 LUCENE-9301: include build time and user name only in non-snapshot builds so that jars are not recompiled on each build in development.
da3dbb1 is described below
commit da3dbb1921dd266ff4e78e6eabcc497958cb3933
Author: Dawid Weiss <dw...@apache.org>
AuthorDate: Mon Jun 1 10:00:46 2020 +0200
LUCENE-9301: include build time and user name only in non-snapshot builds so that jars are not recompiled on each build in development.
---
build.gradle | 2 ++
gradle/jar-manifest.gradle | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index 2e80ed8..3a08ec4 100644
--- a/build.gradle
+++ b/build.gradle
@@ -54,6 +54,8 @@ ext {
}
return m[0][1] as int
}
+ // snapshot build marker used in scripts.
+ snapshotBuild = version.contains("SNAPSHOT")
// Build timestamp.
def tstamp = ZonedDateTime.now()
diff --git a/gradle/jar-manifest.gradle b/gradle/jar-manifest.gradle
index 69b4116..9b2cd68 100644
--- a/gradle/jar-manifest.gradle
+++ b/gradle/jar-manifest.gradle
@@ -48,7 +48,14 @@ allprojects {
// awkward on import and resolves provider properties even though task dependencies
// have not been run yet?
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 {