Skip to content

Commit dc4a3e2

Browse files
authored
Revert default assemble output path back to .artifacts/assembly (#1243)
1 parent a46fbf2 commit dc4a3e2

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/tooling/docs-assembler/AssembleContext.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public AssembleContext(
7474
var contentSource = Environment.ContentSource.ToStringFast(true);
7575
var defaultCheckoutDirectory = Path.Combine(Paths.WorkingDirectoryRoot.FullName, ".artifacts", "checkouts", contentSource);
7676
CheckoutDirectory = ReadFileSystem.DirectoryInfo.New(checkoutDirectory ?? defaultCheckoutDirectory);
77-
var defaultOutputDirectory = Path.Combine(Paths.WorkingDirectoryRoot.FullName, ".artifacts", "assembly", contentSource);
77+
var defaultOutputDirectory = Path.Combine(Paths.WorkingDirectoryRoot.FullName, ".artifacts", "assembly");
7878
OutputDirectory = ReadFileSystem.DirectoryInfo.New(output ?? defaultOutputDirectory);
7979

8080

src/tooling/docs-builder/Cli/Commands.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,13 @@ public async Task Serve(string? path = null, int port = 3000, Cancel ctx = defau
5050
/// Serve html files directly
5151
/// </summary>
5252
/// <param name="port">Port to serve the documentation.</param>
53-
/// <param name="contentSource">The content source to serve defaults to next</param>
5453
/// <param name="ctx"></param>
5554
[Command("serve-static")]
5655
[ConsoleAppFilter<CheckForUpdatesFilter>]
57-
public async Task ServeStatic(int port = 4000, string? contentSource = null, Cancel ctx = default)
56+
public async Task ServeStatic(int port = 4000, Cancel ctx = default)
5857
{
59-
contentSource ??= "next";
6058
AssignOutputLogger();
61-
var host = new StaticWebHost(port, contentSource);
59+
var host = new StaticWebHost(port);
6260
await host.RunAsync(ctx);
6361
await host.StopAsync(ctx);
6462
}

src/tooling/docs-builder/Http/StaticWebHost.cs

+3-5
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ namespace Documentation.Builder.Http;
1717

1818
public class StaticWebHost
1919
{
20-
private readonly string _contentSource;
2120
private readonly WebApplication _webApplication;
2221

23-
public StaticWebHost(int port, string contentSource)
22+
public StaticWebHost(int port)
2423
{
25-
_contentSource = contentSource;
26-
var contentRoot = Path.Combine(Paths.WorkingDirectoryRoot.FullName, ".artifacts", "assembly", _contentSource);
24+
var contentRoot = Path.Combine(Paths.WorkingDirectoryRoot.FullName, ".artifacts", "assembly");
2725

2826
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
2927
{
@@ -63,7 +61,7 @@ private async Task<IResult> ServeDocumentationFile(string slug, Cancel _)
6361
return Results.NotFound();
6462

6563
await Task.CompletedTask;
66-
var path = Path.Combine(Paths.WorkingDirectoryRoot.FullName, ".artifacts", "assembly", _contentSource);
64+
var path = Path.Combine(Paths.WorkingDirectoryRoot.FullName, ".artifacts", "assembly");
6765
var localPath = Path.Combine(path, slug.Replace('/', Path.DirectorySeparatorChar));
6866
var fileInfo = new FileInfo(localPath);
6967
var directoryInfo = new DirectoryInfo(localPath);

0 commit comments

Comments
 (0)