Skip to content

Commit

Permalink
Include 'sourceUrl' column in dependencies report even when empty (el…
Browse files Browse the repository at this point in the history
…astic#57163)

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
mark-vieira and elasticmachine committed May 26, 2020
1 parent 9e03a81 commit 1755b29
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1755b29

Please sign in to comment.