1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 04:53:29 +01:00

updated docfx and added serve argument to cake script

This commit is contained in:
Ell 2023-06-09 12:59:12 +02:00
parent f5f925fab3
commit d69cd80b72

View file

@ -1,11 +1,12 @@
#addin nuget:?package=Cake.DocFx&version=1.0.0
#tool dotnet:?package=docfx&version=2.65.3
#tool dotnet:?package=docfx&version=2.67.3
// this is the upcoming version, for prereleases
var version = Argument("version", "6.2.0");
var target = Argument("target", "Default");
var branch = Argument("branch", "main");
var config = Argument("configuration", "Release");
var serve = HasArgument("serve");
Task("Prepare").Does(() => {
DotNetRestore("MLEM.sln");
@ -65,9 +66,10 @@ Task("Push").WithCriteria(branch == "main" || branch == "release").IsDependentOn
});
Task("Document").Does(() => {
var path = "Docs/docfx.json";
DocFxMetadata(path);
DocFxBuild(path);
DocFxMetadata("Docs/docfx.json");
DocFxBuild("Docs/docfx.json");
if (serve)
DocFxServe("Docs/_site");
});
Task("Default").IsDependentOn("Pack");