代码拉取完成,页面将自动刷新
同步操作将从 Gitee 极速下载/Live-Charts 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
//Addins
#addin Cake.VersionReader
#addin Cake.FileHelpers
#addin Cake.Git
//Variables
var buildType = Argument("Configuration", "Release");
var target = Argument ("target", "Default");
var configuration = "AnyCPU";
Task("OutputArguments")
.Does(() =>
{
Information("Target: " + target);
Information("Build Type: " + buildType);
});
Task("Core")
.Does(() =>
{
Information("Building Core.PCL...");
BuildProject("./Core/Core.csproj", "./bin/Release", buildType, configuration, "v4.5");
Information("Building Core.Net40...");
BuildProject("./Core40/Core40.csproj", "./bin/Net40", buildType, configuration, "v4.0");
Information("Building Core.Net45...");
BuildProject("./Core40/Core40.csproj", "./bin/Net45", buildType, configuration, "v4.5");
Information("Packing Core...");
NugetPack("./Core/Core.nuspec", "./Core/bin/Release/LiveCharts.dll");
Information("-- Core Packed --");
});
Task("WPF")
.Does(() =>
{
var wpfPath = "./WpfView/wpfview.csproj";
Information("Building Wpf.Debug...");
BuildProject(wpfPath, "./bin/Debug", "Debug", configuration, "v4.0");
Information("Building Wpf.Net40...");
BuildProject(wpfPath, "./bin/net403", "Release", configuration, "v4.0");
Information("Building Wpf.Debug...");
BuildProject(wpfPath, "./bin/net45", "Release", configuration, "v4.5");
Information("Packing Wpf...");
NugetPack("./WpfView/WpfView.nuspec", "./WpfView/bin/net403/LiveCharts.Wpf.dll");
Information("-- WPF Packed --");
});
Task("WinForms")
.Does(() =>
{
var formsPath = "./WinFormsView/WinFormsView.csproj";
Information("Building WinForms.Debug...");
BuildProject(formsPath, "./bin/Debug", "Debug", configuration, "v4.0");
Information("Building WinForms.Net40...");
BuildProject(formsPath, "./bin/net403", "Release", configuration, "v4.0");
Information("Building WinForms.Debug...");
BuildProject(formsPath, "./bin/net45", "Release", configuration, "v4.5");
Information("Packing WinForms...");
NugetPack("./WinFormsView/WinFormsView.nuspec", "./WinFormsView/bin/net403/LiveCharts.WinForms.dll");
Information("-- WinForms Packed --");
});
Task("UWP")
.Does(() =>
{
Information("Building UWP...");
BuildProject("./UwpView/UwpView.csproj", "./bin/AnyCPU", buildType, "AnyCPU");
Information("Packing UWP...");
NugetPack("./UwpView/UwpView.nuspec", "./UwpView/bin/AnyCPU/LiveCharts.Uwp.dll");
Information("-- UWP Packed --");
});
Task("Default")
.IsDependentOn("OutputArguments")
.IsDependentOn("Core")
.IsDependentOn("WPF")
.IsDependentOn("WinForms")
.IsDependentOn("UWP");
//Entry point for Cake build
RunTarget (target);
//Helper Methods
//Build a project
public void BuildProject(string path, string outputPath, string configuration,
string platform, string targetVersion = null)
{
Information("Building " + path);
try
{
DotNetBuild(path, settings =>
{
settings.SetConfiguration(configuration)
.WithProperty("Platform", platform)
.WithTarget("Clean,Build")
.WithProperty("OutputPath", outputPath)
.SetVerbosity(Cake.Core.Diagnostics.Verbosity.Minimal);
if (targetVersion != null)
settings.WithProperty("TargetFrameworkVersion", targetVersion);
});
}
catch(Exception ex)
{
Error("An error occurred while trying to build {0} with {1}", path, configuration);
}
Information("Build completed");
}
//Pack into Nuget package
public void NugetPack(string nuspecPath, string mainBinaryPath)
{
Information("Packing " + nuspecPath);
var binary = MakeAbsolute(File(mainBinaryPath));
var binaryVersion = GetFullVersionNumber(binary);
ReplaceRegexInFiles(nuspecPath, "0.0.0.0", binaryVersion);
NuGetPack(nuspecPath, new NuGetPackSettings{
Verbosity = NuGetVerbosity.Quiet,
OutputDirectory = "./"
});
//We revert the nuspec file to the check out one, otherwise we cannot build it again with a new version
//This should rather use XmlPoke but cannot yet get it to work
var fullNuspecPath = MakeAbsolute(File(nuspecPath));
GitCheckout("./", fullNuspecPath);
Information("Packing completed");
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。