diff options
author | Nik Everett <nik9000@gmail.com> | 2016-04-15 11:35:05 -0400 |
---|---|---|
committer | Nik Everett <nik9000@gmail.com> | 2016-04-15 11:35:05 -0400 |
commit | c966d14f8b3d8b76f214f6b397b3b894ac92ffbf (patch) | |
tree | 8b12275eb77ee23c9e80ad4f878baf59099104c8 /build.gradle | |
parent | 95579ca95ad050d1573255d5b461c4a9cf570726 (diff) |
[build] Don't resolve the revision hash unless you need it
This fixes the build for folks that build without git installed locally
and should speed up the general case because we aren't trying to resolve
git information when it isn't really needed.
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle index dab1c256d2..21e7a49bd4 100644 --- a/build.gradle +++ b/build.gradle @@ -53,10 +53,10 @@ subprojects { tests = false } nexus { - Repository repo = new RepositoryBuilder().findGitDir(new File('.')).build() - String shortHash = repo.resolve('HEAD')?.name?.substring(0,7) String buildSnapshot = System.getProperty('build.snapshot', 'true') if (buildSnapshot == 'false') { + Repository repo = new RepositoryBuilder().findGitDir(new File('.')).build() + String shortHash = repo.resolve('HEAD')?.name?.substring(0,7) repositoryUrl = project.hasProperty('build.repository') ? project.property('build.repository') : "file://${System.getenv('HOME')}/elasticsearch-releases/${version}-${shortHash}/" } } |