Include 'sourceUrl' column in dependencies report even when empty (#57163)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Mark Vieira 2020-05-26 15:05:48 -07:00
parent a2864191d6
commit 3a3efeb9c7
No known key found for this signature in database
GPG Key ID: CA947EF7E6D4B105

View File

@ -145,14 +145,14 @@ class DependenciesInfoTask extends ConventionTask {
// As we have the license file, we create a Custom entry with the URL to this license file.
final gitBranch = System.getProperty('build.branch', 'master')
final String githubBaseURL = "https://raw.githubusercontent.com/elastic/elasticsearch/${gitBranch}/"
licenseType = "${licenseInfo.identifier};${license.getCanonicalPath().replaceFirst('.*/elasticsearch/', githubBaseURL)}"
licenseType = "${licenseInfo.identifier};${license.getCanonicalPath().replaceFirst('.*/elasticsearch/', githubBaseURL)},"
} else {
licenseType = licenseInfo.identifier
licenseType = "${licenseInfo.identifier},"
}
if (licenseInfo.sourceRedistributionRequired) {
File sources = getDependencyInfoFile(group, name, 'SOURCES')
licenseType += ",${sources.text.trim()}"
licenseType += "${sources.text.trim()}"
}
return licenseType