From 4df927bcddba586ab38c4b9ca17bd409462a5c9d Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Fri, 8 Jun 2018 20:22:26 -0400 Subject: [PATCH] Remove version from license file name for GCS SDK Most of our license file names strip the version off the artifact name when deducing the license filename. However, the version on the GCS SDK (google-api-services-storage) does not match the usual format and instead starts with a vee. This means that the license filename for this license ended up carrying the version and we should not do that. This commit adjusts the regex the deduces the license filename to account for this case, and adjusts the google-api-services-storage license files accordingly. --- .../gradle/precommit/DependencyLicensesTask.groovy | 2 +- ...v115-LICENSE.txt => google-api-services-storage-LICENSE.txt} | 0 ...rev115-NOTICE.txt => google-api-services-storage-NOTICE.txt} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename plugins/repository-gcs/licenses/{google-api-services-storage-v1-rev115-LICENSE.txt => google-api-services-storage-LICENSE.txt} (100%) rename plugins/repository-gcs/licenses/{google-api-services-storage-v1-rev115-NOTICE.txt => google-api-services-storage-NOTICE.txt} (100%) diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/DependencyLicensesTask.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/DependencyLicensesTask.groovy index 4d292d87ec39c..df30326a59d79 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/DependencyLicensesTask.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/DependencyLicensesTask.groovy @@ -151,7 +151,7 @@ public class DependencyLicensesTask extends DefaultTask { for (File dependency : dependencies) { String jarName = dependency.getName() - String depName = jarName - ~/\-\d+.*/ + String depName = jarName - ~/\-v?\d+.*/ if (ignoreShas.contains(depName)) { // local deps should not have sha files! if (getShaFile(jarName).exists()) { diff --git a/plugins/repository-gcs/licenses/google-api-services-storage-v1-rev115-LICENSE.txt b/plugins/repository-gcs/licenses/google-api-services-storage-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-api-services-storage-v1-rev115-LICENSE.txt rename to plugins/repository-gcs/licenses/google-api-services-storage-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/google-api-services-storage-v1-rev115-NOTICE.txt b/plugins/repository-gcs/licenses/google-api-services-storage-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-api-services-storage-v1-rev115-NOTICE.txt rename to plugins/repository-gcs/licenses/google-api-services-storage-NOTICE.txt