代码拉取完成,页面将自动刷新
#addin "nuget:https://www.nuget.org/api/v2?package=Newtonsoft.Json&version=9.0.1"
#load "./build/index.cake"
var target = Argument("target", "Default");
var build = BuildParameters.Create(Context);
var util = new Util(Context, build);
Task("Clean")
.Does(() =>
{
if (DirectoryExists("./artifacts"))
{
DeleteDirectory("./artifacts", true);
}
});
Task("Restore")
.IsDependentOn("Clean")
.Does(() =>
{
var settings = new DotNetCoreRestoreSettings
{
ArgumentCustomization = args =>
{
args.Append($"/p:VersionSuffix={build.Version.Suffix}");
return args;
}
};
DotNetCoreRestore(settings);
});
Task("Build")
.IsDependentOn("Restore")
.Does(() =>
{
var settings = new DotNetCoreBuildSettings
{
Configuration = build.Configuration,
VersionSuffix = build.Version.Suffix,
ArgumentCustomization = args =>
{
args.Append($"/p:InformationalVersion={build.Version.VersionWithSuffix()}");
return args;
}
};
foreach (var project in build.ProjectFiles)
{
DotNetCoreBuild(project.FullPath, settings);
}
});
Task("Test")
.IsDependentOn("Build")
.Does(() =>
{
foreach (var testProject in build.TestProjectFiles)
{
//DotNetCoreTest(testProject.FullPath);
}
});
Task("Pack")
.Does(() =>
{
var settings = new DotNetCorePackSettings
{
Configuration = build.Configuration,
VersionSuffix = build.Version.Suffix,
IncludeSymbols = true,
OutputDirectory = "./artifacts/packages"
};
foreach (var project in build.ProjectFiles)
{
DotNetCorePack(project.FullPath, settings);
}
});
Task("Default")
.IsDependentOn("Build")
.IsDependentOn("Test")
.IsDependentOn("Pack")
.Does(() =>
{
util.PrintInfo();
});
Task("Version")
.Does(() =>
{
Information($"{build.FullVersion()}");
});
Task("Print")
.Does(() =>
{
util.PrintInfo();
});
RunTarget(target);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。