Skip to content

Commit

Permalink
Adapting build script to ongoing Statiq Framework changes
Browse files Browse the repository at this point in the history
  • Loading branch information
daveaglick committed Nov 23, 2019
1 parent 98cc21f commit d4ca193
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
4 changes: 2 additions & 2 deletions build/NetlifySharp.Build/NetlifySharp.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<DefaultItemExcludes>$(DefaultItemExcludes);output\**;temp\**;reportgenerator.exe;nuget.exe</DefaultItemExcludes>
</PropertyGroup>

<!--
<ItemGroup>
<PackageReference Include="Statiq.App" Version="1.0.0-alpha.19" />
</ItemGroup>
-->

<!--
<ItemGroup>
<ProjectReference Include="..\..\..\..\statiqdev\Statiq.Framework\src\core\Statiq.App\Statiq.App.csproj" />
<ProjectReference Include="..\..\..\..\statiqdev\Statiq.Framework\src\core\Statiq.Common\Statiq.Common.csproj" />
<ProjectReference Include="..\..\..\..\statiqdev\Statiq.Framework\src\core\Statiq.Core\Statiq.Core.csproj" />
</ItemGroup>
-->
</Project>
21 changes: 2 additions & 19 deletions build/NetlifySharp.Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ public class Program
private const string BuildProperties = nameof(BuildProperties);

public static async Task<int> Main(string[] args) => await Bootstrapper
.CreateDefault(args, DefaultsToAdd.All & ~DefaultsToAdd.Commands)

// Configure build settings for the correct version
.CreateDefault(args)
.ConfigureSettings(x =>
{
string version = File.ReadAllLines("../../ReleaseNotes.md")[0].TrimStart('#').Trim();
Expand All @@ -28,22 +26,7 @@ public class Program
x[BuildVersion] = version;
x[BuildProperties] = $"-p:Version={version} -p:AssemblyVersion={version} -p:FileVersion={version}";
})

// Add build commands to the CLI
.AddBuildCommand("build", "Builds all projects.", nameof(Build))
.AddBuildCommand("test", "Builds and tests all projects.", nameof(Test))
.AddBuildCommand("pack", "Packs the packages.", nameof(Pack))
.AddBuildCommand("zip", "Zips the binaries.", nameof(Zip))
.AddBuildCommand("publish", "Publishes the packages and documentation site.", nameof(Publish))

// Add pipelines
.AddPipeline<Build>()
.AddPipeline<Test>()
.AddPipeline<Pack>()
.AddPipeline<Zip>()
.AddPipeline<Publish>()

// Run the app
.AddPipelines<Program>()
.RunAsync();

private static DirectoryPath GetBuildPath(IDocument doc, IExecutionContext ctx) =>
Expand Down

0 comments on commit d4ca193

Please sign in to comment.