-
Notifications
You must be signed in to change notification settings - Fork 800
Set default OutputPath and add IntermediateOutputPath at PipelineContext level #12414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
adf5bc4
4876719
5ce261a
7a481ce
368f679
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ | |
|
|
||
| using System.Diagnostics.CodeAnalysis; | ||
| using Aspire.Hosting.ApplicationModel; | ||
| using Microsoft.Extensions.Configuration; | ||
| using Microsoft.Extensions.DependencyInjection; | ||
| using Microsoft.Extensions.Logging; | ||
|
|
||
| namespace Aspire.Hosting.Pipelines; | ||
|
|
@@ -53,5 +55,24 @@ public sealed class PipelineContext( | |
| /// <summary> | ||
| /// Gets the output path for deployment artifacts. | ||
| /// </summary> | ||
| public string? OutputPath { get; } = outputPath; | ||
| public string OutputPath { get; } = outputPath ?? Path.Combine(Environment.CurrentDirectory, "aspire-output"); | ||
|
|
||
| /// <summary> | ||
| /// Gets the intermediate output path for temporary build artifacts. | ||
| /// </summary> | ||
| public string IntermediateOutputPath { get; } = GetIntermediateOutputPath(serviceProvider); | ||
|
|
||
| private static string GetIntermediateOutputPath(IServiceProvider serviceProvider) | ||
eerhardt marked this conversation as resolved.
Show resolved
Hide resolved
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does this directory get cleaned up?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We dont clean anything up. I think it should be relative to your app folder tbh but I just want to flow a property through so we can begin to use it. |
||
| { | ||
| var configuration = serviceProvider.GetRequiredService<IConfiguration>(); | ||
| var appHostSha = configuration["AppHost:PathSha256"]; | ||
|
|
||
| if (!string.IsNullOrEmpty(appHostSha)) | ||
| { | ||
| return Directory.CreateTempSubdirectory($"aspire-{appHostSha}").FullName; | ||
| } | ||
|
|
||
| // Fallback if AppHost:PathSha256 is not available | ||
| return Directory.CreateTempSubdirectory("aspire").FullName; | ||
| } | ||
| } | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not continue using the shared Utils method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea I didn't rrealize what it did originally.