Selaa lähdekoodia

Fix license check failures on Windows

mark-vieira 4 vuotta sitten
vanhempi
commit
7a6b6916e0

+ 4 - 4
build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/LicenseAnalyzer.java

@@ -153,12 +153,12 @@ public class LicenseAnalyzer {
         new LicenseMatcher("LGPL-2.1", true, true, Pattern.compile("GNU LESSER GENERAL PUBLIC LICENSE.*Version 2.1", Pattern.DOTALL)),
         new LicenseMatcher("LGPL-3.0", true, true, Pattern.compile("GNU LESSER GENERAL PUBLIC LICENSE.*Version 3", Pattern.DOTALL)),
         new LicenseMatcher("GeoLite", false, false,
-            Pattern.compile("The Elastic GeoIP Database Service uses the GeoLite2 Data created " +
+            Pattern.compile(("The Elastic GeoIP Database Service uses the GeoLite2 Data created " +
                 "and licensed by MaxMind,\nwhich is governed by MaxMind’s GeoLite2 End User License Agreement, " +
-                "available at https://www.maxmind.com/en/geolite2/eula.\n", Pattern.DOTALL)),
+                "available at https://www.maxmind.com/en/geolite2/eula.\n").replaceAll("\\s+", "\\\\s*"), Pattern.DOTALL)),
         new LicenseMatcher("GeoIp-Database-Service", false, false,
-            Pattern.compile("By using the GeoIP Database Service, you agree to the Elastic GeoIP Database Service Agreement,\n" +
-                "available at www.elastic.co/elastic-geoip-database-service-terms.", Pattern.DOTALL))};
+            Pattern.compile(("By using the GeoIP Database Service, you agree to the Elastic GeoIP Database Service Agreement,\n" +
+                "available at www.elastic.co/elastic-geoip-database-service-terms.").replaceAll("\\s+", "\\\\s*"), Pattern.DOTALL))};
 
 
     public static LicenseInfo licenseType(File licenseFile) {