Skip to content

Commit 340c231

Browse files
committed
fix configuration exporter copying by name not fullname
1 parent e5030ec commit 340c231

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

src/tooling/docs-assembler/Exporters/ElasticsearchMarkdownExporter.cs

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -17,49 +17,6 @@
1717

1818
namespace Documentation.Assembler.Exporters;
1919

20-
public class ConfigurationExporter(ILoggerFactory logFactory, AssembleContext context) : IMarkdownExporter
21-
{
22-
private readonly ILogger<ConfigurationExporter> _logger = logFactory.CreateLogger<ConfigurationExporter>();
23-
24-
/// <inheritdoc />
25-
public ValueTask StartAsync(CancellationToken ctx = default) => default;
26-
27-
/// <inheritdoc />
28-
public ValueTask StopAsync(CancellationToken ctx = default) => default;
29-
30-
/// <inheritdoc />
31-
public ValueTask<bool> ExportAsync(MarkdownExportFileContext fileContext, CancellationToken ctx) => default;
32-
33-
/// <inheritdoc />
34-
public ValueTask<bool> FinishExportAsync(IDirectoryInfo outputFolder, CancellationToken ctx)
35-
{
36-
var fs = context.WriteFileSystem;
37-
var configFolder = fs.DirectoryInfo.New(Path.Combine(context.OutputDirectory.FullName, "config"));
38-
if (!configFolder.Exists)
39-
configFolder.Create();
40-
41-
_logger.LogInformation("Exporting configuration");
42-
43-
var assemblerConfig = context.ConfigurationFileProvider.AssemblerFile;
44-
_logger.LogInformation("Exporting {Name} to {ConfigFolder}", assemblerConfig.Name, configFolder.FullName);
45-
context.WriteFileSystem.File.Copy(assemblerConfig.FullName, Path.Combine(configFolder.FullName, assemblerConfig.Name), true);
46-
47-
var navigationConfig = context.ConfigurationFileProvider.NavigationFile;
48-
_logger.LogInformation("Exporting {Name} to {ConfigFolder}", navigationConfig.Name, configFolder.FullName);
49-
context.WriteFileSystem.File.Copy(navigationConfig.FullName, Path.Combine(configFolder.FullName, navigationConfig.Name), true);
50-
51-
var legacyUrlMappingsConfig = context.ConfigurationFileProvider.LegacyUrlMappingsFile;
52-
_logger.LogInformation("Exporting {Name} to {ConfigFolder}", legacyUrlMappingsConfig.Name, configFolder.FullName);
53-
context.WriteFileSystem.File.Copy(legacyUrlMappingsConfig.Name, Path.Combine(configFolder.FullName, legacyUrlMappingsConfig.Name), true);
54-
55-
var versionsConfig = context.ConfigurationFileProvider.VersionFile;
56-
_logger.LogInformation("Exporting {Name} to {ConfigFolder}", versionsConfig.Name, configFolder.FullName);
57-
context.WriteFileSystem.File.Copy(versionsConfig.Name, Path.Combine(configFolder.FullName, versionsConfig.Name), true);
58-
59-
return default;
60-
}
61-
}
62-
6320
public class ElasticsearchMarkdownExporter : IMarkdownExporter, IDisposable
6421
{
6522
private readonly DiagnosticsCollector _collector;

0 commit comments

Comments
 (0)