-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathProgram.cs
More file actions
38 lines (32 loc) · 1.21 KB
/
Copy pathProgram.cs
File metadata and controls
38 lines (32 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using ModularPipelines.Extensions;
using EnumerableAsyncProcessor.Pipeline.Modules;
using EnumerableAsyncProcessor.Pipeline.Modules.LocalMachine;
using EnumerableAsyncProcessor.Pipeline.Settings;
var builder = ModularPipelines.Pipeline.CreateBuilder(args);
builder.Configuration
.AddJsonFile("appsettings.json")
.AddUserSecrets<Program>()
.AddEnvironmentVariables();
builder.Services.Configure<NuGetSettings>(builder.Configuration.GetSection("NuGet"));
if (builder.Environment.IsDevelopment())
{
builder.AddModule<CreateLocalNugetFolderModule>()
.AddModule<AddLocalNugetSourceModule>()
.AddModule<UploadPackagesToLocalNuGetModule>();
}
else
{
builder.AddModule<UploadPackagesToNugetModule>();
}
builder.AddModule<BuildBenchmarkProjectsModule>()
.AddModule<BuildExampleProjectsModule>()
.AddModule<RunUnitTestsModule>()
.AddModule<NugetVersionGeneratorModule>()
.AddModule<PackProjectsModule>()
.AddModule<PackageFilesRemovalModule>()
.AddModule<PackagePathsParserModule>();
await using var pipeline = builder.Build();
await pipeline.RunAsync();