Fix git info lookup to use correct dir where git exists
This commit is contained in:
parent
cec4b9a71c
commit
7cf758943e
|
@ -81,7 +81,7 @@ subprojects {
|
|||
nexus {
|
||||
String buildSnapshot = System.getProperty('build.snapshot', 'true')
|
||||
if (buildSnapshot == 'false') {
|
||||
Repository repo = new RepositoryBuilder().findGitDir(new File('.')).build()
|
||||
Repository repo = new RepositoryBuilder().findGitDir(project.rootDir).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}/"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue