|
| 1 | +diff --git a/nbbuild/misc/prepare-bundles/src/main/java/org/netbeans/prepare/bundles/PrepareBundles.java b/nbbuild/misc/prepare-bundles/src/main/java/org/netbeans/prepare/bundles/PrepareBundles.java |
| 2 | +index d24c6f5ec9..f2b040204e 100644 |
| 3 | +--- a/nbbuild/misc/prepare-bundles/src/main/java/org/netbeans/prepare/bundles/PrepareBundles.java |
| 4 | ++++ b/nbbuild/misc/prepare-bundles/src/main/java/org/netbeans/prepare/bundles/PrepareBundles.java |
| 5 | +@@ -58,7 +58,8 @@ public class PrepareBundles { |
| 6 | + Pattern.compile("license", Pattern.CASE_INSENSITIVE), |
| 7 | + Pattern.compile("LICENSE.txt", Pattern.CASE_INSENSITIVE), |
| 8 | + Pattern.compile("LICENSE-MIT.txt", Pattern.CASE_INSENSITIVE), |
| 9 | +- Pattern.compile("LICENSE.md", Pattern.CASE_INSENSITIVE) |
| 10 | ++ Pattern.compile("LICENSE.md", Pattern.CASE_INSENSITIVE), |
| 11 | ++ Pattern.compile("LICENSE.markdown", Pattern.CASE_INSENSITIVE) |
| 12 | + ); |
| 13 | + private static final String nl = "\n"; |
| 14 | + |
| 15 | +@@ -69,7 +70,12 @@ public class PrepareBundles { |
| 16 | + |
| 17 | + Path targetDir = Paths.get(args[0]); |
| 18 | + Path packagesDir = targetDir.resolve("package"); |
| 19 | +- new ProcessBuilder("npm", "install").directory(packagesDir.toFile()).inheritIO().start().waitFor(); |
| 20 | ++ String os = System.getProperty("os.name").toLowerCase(); |
| 21 | ++ if (os.contains("windows")) { |
| 22 | ++ new ProcessBuilder("npm.cmd", "install").directory(packagesDir.toFile()).inheritIO().start().waitFor(); |
| 23 | ++ } else{ |
| 24 | ++ new ProcessBuilder("npm", "install").directory(packagesDir.toFile()).inheritIO().start().waitFor(); |
| 25 | ++ } |
| 26 | + Path bundlesDir = targetDir.resolve("bundles"); |
| 27 | + Files.createDirectories(bundlesDir); |
| 28 | + try (DirectoryStream<Path> ds = Files.newDirectoryStream(bundlesDir)) { |
| 29 | +@@ -107,6 +113,8 @@ public class PrepareBundles { |
| 30 | + if ("@types".equals(module.getFileName().toString())) continue; |
| 31 | + if ("@esbuild".equals(module.getFileName().toString())) continue; |
| 32 | + if ("@microsoft".equals(module.getFileName().toString())) continue; |
| 33 | ++ if ("eastasianwidth".equals(module.getFileName().toString())) continue; |
| 34 | ++ if ("isarray".equals(module.getFileName().toString())) continue; |
| 35 | + Path packageJson = module.resolve("package.json"); |
| 36 | + if (Files.isReadable(packageJson)) { |
| 37 | + checkModule(module, sb, tokens2Projects, project2License, bundlesDir, targetDir, externalDir, binariesList); |
0 commit comments