-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
43 lines (40 loc) · 1.7 KB
/
Program.cs
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
39
40
41
42
43
using System;
using System.Threading.Tasks;
using Statiq.App;
using Statiq.Common;
namespace Marvin;
public class Program
{
private static readonly NormalizedPath ArtifactsFolder = "artifacts";
public static async Task<int> Main(string[] args) =>
await Bootstrapper
.Factory
.CreateDefaultWithout(args, DefaultFeatures.Pipelines)
.BuildConfiguration(builder => builder.AddSettingsFile(
new NormalizedPath(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.Parent.Parent.Combine("marvin")))
.ConfigureFileSystem(x =>
{
x.RootPath = new NormalizedPath(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.Parent.Parent;
x.OutputPath = x.RootPath / ArtifactsFolder;
x.InputPaths.Clear();
x.InputPaths.Add(x.RootPath);
})
.ConfigureSettings(settings =>
{
settings.Add(Settings.IsBuildServer, settings.ContainsAnyKeys("GITHUB_ACTIONS", "TF_BUILD"));
settings[Keys.CleanMode] = CleanMode.Full;
})
.AddPipeline<Pipelines.GetVersions>()
.AddPipelines((settings, pipelines) =>
{
foreach (ProjectSet projectSet in settings.GetProjectSets())
{
pipelines.Add(new Pipelines.Build(projectSet));
pipelines.Add(new Pipelines.Test(projectSet));
pipelines.Add(new Pipelines.Pack(projectSet));
pipelines.Add(new Pipelines.Publish(projectSet));
pipelines.Add(new Pipelines.Deploy(projectSet));
}
})
.RunAsync();
}