mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-21 20:43:29 +01:00
updated build script
This commit is contained in:
parent
53cda02ec4
commit
39a7dd3e97
3 changed files with 18 additions and 14 deletions
|
@ -3,10 +3,10 @@
|
|||
"isRoot": true,
|
||||
"tools": {
|
||||
"cake.tool": {
|
||||
"version": "1.3.0",
|
||||
"version": "2.2.0",
|
||||
"commands": [
|
||||
"dotnet-cake"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
6
FNA.Settings.props
Normal file
6
FNA.Settings.props
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" />
|
||||
</ItemGroup>
|
||||
</Project>
|
22
build.cake
22
build.cake
|
@ -8,8 +8,8 @@ var branch = Argument("branch", "main");
|
|||
var config = Argument("configuration", "Release");
|
||||
|
||||
Task("Prepare").Does(() => {
|
||||
DotNetCoreRestore("MLEM.sln");
|
||||
DotNetCoreRestore("MLEM.FNA.sln");
|
||||
DotNetRestore("MLEM.sln");
|
||||
DotNetRestore("MLEM.FNA.sln");
|
||||
|
||||
if (branch != "release") {
|
||||
var buildNum = EnvironmentVariable("BUILD_NUMBER");
|
||||
|
@ -21,32 +21,30 @@ Task("Prepare").Does(() => {
|
|||
});
|
||||
|
||||
Task("Build").IsDependentOn("Prepare").Does(() =>{
|
||||
var settings = new DotNetCoreBuildSettings {
|
||||
var settings = new DotNetBuildSettings {
|
||||
Configuration = config,
|
||||
ArgumentCustomization = args => args.Append($"/p:Version={version}")
|
||||
};
|
||||
foreach (var project in GetFiles("**/MLEM*.csproj"))
|
||||
DotNetCoreBuild(project.FullPath, settings);
|
||||
DotNetCoreBuild("Demos/Demos.csproj", settings);
|
||||
DotNetCoreBuild("Demos/Demos.FNA.csproj", settings);
|
||||
DotNetBuild("MLEM.sln", settings);
|
||||
DotNetBuild("MLEM.FNA.sln", settings);
|
||||
});
|
||||
|
||||
Task("Test").IsDependentOn("Build").Does(() => {
|
||||
var settings = new DotNetCoreTestSettings {
|
||||
var settings = new DotNetTestSettings {
|
||||
Configuration = config,
|
||||
Collectors = {"XPlat Code Coverage"}
|
||||
};
|
||||
DotNetCoreTest("Tests/Tests.csproj", settings);
|
||||
DotNetCoreTest("Tests/Tests.FNA.csproj", settings);
|
||||
DotNetTest("Tests/Tests.csproj", settings);
|
||||
DotNetTest("Tests/Tests.FNA.csproj", settings);
|
||||
});
|
||||
|
||||
Task("Pack").IsDependentOn("Test").Does(() => {
|
||||
var settings = new DotNetCorePackSettings {
|
||||
var settings = new DotNetPackSettings {
|
||||
Configuration = config,
|
||||
ArgumentCustomization = args => args.Append($"/p:Version={version}")
|
||||
};
|
||||
foreach (var project in GetFiles("**/MLEM*.csproj"))
|
||||
DotNetCorePack(project.FullPath, settings);
|
||||
DotNetPack(project.FullPath, settings);
|
||||
});
|
||||
|
||||
Task("Push").WithCriteria(branch == "main" || branch == "release").IsDependentOn("Pack").Does(() => {
|
||||
|
|
Loading…
Reference in a new issue