mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[build-scripts] Do not write plugins.xml if the plugins list is empty
This fixes an exception ``` 'non_bundled_plugins' build step failed: java.nio.file.NoSuchFileException: /mnt/agent/work/89e70edcf4afcfd6/out/idea-ue/artifacts/IU-plugins/auto-uploading/plugins.xml ``` thrown from `generatePluginRepositoryMetaFile` GitOrigin-RevId: ec76222f5d024dafb9b41b6040be71fd43055681
This commit is contained in:
committed by
intellij-monorepo-bot
parent
55e3683e99
commit
9509c9b22d
+8
-2
@@ -471,8 +471,14 @@ internal suspend fun buildNonBundledPlugins(
|
||||
|
||||
if (prepareCustomPluginRepository) {
|
||||
val list = pluginSpecs.sortedBy { it.pluginZip }
|
||||
generatePluginRepositoryMetaFile(list, context.nonBundledPlugins, context)
|
||||
generatePluginRepositoryMetaFile(list.filter { it.pluginZip.startsWith(context.nonBundledPluginsToBePublished) }, context.nonBundledPluginsToBePublished, context)
|
||||
if (list.isNotEmpty()) {
|
||||
generatePluginRepositoryMetaFile(list, context.nonBundledPlugins, context)
|
||||
}
|
||||
|
||||
val pluginsToBePublished = list.filter { it.pluginZip.startsWith(context.nonBundledPluginsToBePublished) }
|
||||
if (pluginsToBePublished.isNotEmpty()) {
|
||||
generatePluginRepositoryMetaFile(pluginsToBePublished, context.nonBundledPluginsToBePublished, context)
|
||||
}
|
||||
}
|
||||
|
||||
validatePlugins(context, pluginSpecs)
|
||||
|
||||
+2
@@ -14,11 +14,13 @@ import java.util.*
|
||||
import kotlin.io.path.createDirectories
|
||||
|
||||
internal fun generatePluginRepositoryMetaFile(pluginSpecs: List<PluginRepositorySpec>, targetDir: Path, context: BuildContext): Path {
|
||||
require(pluginSpecs.isNotEmpty())
|
||||
val categories = TreeMap<String, MutableList<Plugin>>()
|
||||
for (spec in pluginSpecs) {
|
||||
val p = readPlugin(spec.pluginZip, spec.pluginXml, context.buildNumber, targetDir)
|
||||
categories.computeIfAbsent(p.category) { mutableListOf() }.add(p)
|
||||
}
|
||||
Files.createDirectories(targetDir)
|
||||
val result = targetDir.resolve("plugins.xml")
|
||||
writePluginsXml(result, categories)
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user