mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-04 05:34:51 +00:00
Adjusted for NUKE
This commit is contained in:
@@ -78,13 +78,12 @@
|
||||
"enum": [
|
||||
"Clean",
|
||||
"Compile",
|
||||
"CopyFiles",
|
||||
"CreatePackage",
|
||||
"CreatePackages",
|
||||
"Default",
|
||||
"Package",
|
||||
"PrePublish",
|
||||
"Publish",
|
||||
"PublishPackage",
|
||||
"PublishPackages",
|
||||
"PublishPreRelease",
|
||||
"PublishRelease",
|
||||
"Restore",
|
||||
@@ -104,13 +103,12 @@
|
||||
"enum": [
|
||||
"Clean",
|
||||
"Compile",
|
||||
"CopyFiles",
|
||||
"CreatePackage",
|
||||
"CreatePackages",
|
||||
"Default",
|
||||
"Package",
|
||||
"PrePublish",
|
||||
"Publish",
|
||||
"PublishPackage",
|
||||
"PublishPackages",
|
||||
"PublishPreRelease",
|
||||
"PublishRelease",
|
||||
"Restore",
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
set ENETVER=23.6.1
|
||||
echo "Start building Electron.NET dev stack..."
|
||||
echo "Restore & Build API"
|
||||
cd ElectronNet.API
|
||||
dotnet restore
|
||||
dotnet build --configuration Release --force /property:Version=%ENETVER%
|
||||
dotnet pack /p:Version=%ENETVER% --configuration Release --force --output "%~dp0artifacts"
|
||||
cd ..
|
||||
echo "Restore & Build CLI"
|
||||
cd ElectronNet.CLI
|
||||
dotnet restore
|
||||
dotnet build --configuration Release --force /property:Version=%ENETVER%
|
||||
dotnet pack /p:Version=%ENETVER% --configuration Release --force --output "%~dp0artifacts"
|
||||
cd ..
|
||||
@@ -61,6 +61,17 @@ class Build : NukeBuild
|
||||
|
||||
string Version { get; set; }
|
||||
|
||||
AbsolutePath[] Projects
|
||||
{
|
||||
get
|
||||
{
|
||||
var api = SourceDirectory / ApiTargetLibName / $"{ApiTargetLibName}.csproj";
|
||||
var cli = SourceDirectory / CliTargetLibName / $"{CliTargetLibName}.csproj";
|
||||
var projects = new[] { api, cli };
|
||||
return projects;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnBuildInitialized()
|
||||
{
|
||||
var parser = new ReleaseNotesParser();
|
||||
@@ -105,40 +116,45 @@ class Build : NukeBuild
|
||||
Target Restore => _ => _
|
||||
.Executes(() =>
|
||||
{
|
||||
DotNetRestore(s => s
|
||||
.SetProjectFile(Solution));
|
||||
Projects.ForEach(project =>
|
||||
{
|
||||
DotNetRestore(s => s
|
||||
.SetProjectFile(project));
|
||||
});
|
||||
});
|
||||
|
||||
Target Compile => _ => _
|
||||
.DependsOn(Restore)
|
||||
.Executes(() =>
|
||||
{
|
||||
DotNetBuild(s => s
|
||||
.SetProjectFile(Solution)
|
||||
.SetConfiguration(Configuration)
|
||||
.EnableNoRestore());
|
||||
Projects.ForEach(project =>
|
||||
{
|
||||
DotNetBuild(s => s
|
||||
.SetProjectFile(project)
|
||||
.SetConfiguration(Configuration)
|
||||
.EnableNoRestore());
|
||||
});
|
||||
});
|
||||
|
||||
Target RunUnitTests => _ => _
|
||||
.DependsOn(Compile)
|
||||
.Executes(() =>
|
||||
{
|
||||
DotNetTest(s => s
|
||||
.SetProjectFile(Solution)
|
||||
.SetConfiguration(Configuration)
|
||||
.EnableNoRestore()
|
||||
.EnableNoBuild());
|
||||
Projects.ForEach(project =>
|
||||
{
|
||||
DotNetTest(s => s
|
||||
.SetProjectFile(project)
|
||||
.SetConfiguration(Configuration)
|
||||
.EnableNoRestore()
|
||||
.EnableNoBuild());
|
||||
});
|
||||
});
|
||||
|
||||
Target CreatePackages => _ => _
|
||||
.DependsOn(Compile)
|
||||
.Executes(() =>
|
||||
{
|
||||
var api = SourceDirectory / ApiTargetLibName / $"{ApiTargetLibName}.csproj";
|
||||
var cli = SourceDirectory / CliTargetLibName / $"{CliTargetLibName}.csproj";
|
||||
var projects = new[] { api, cli };
|
||||
|
||||
projects.ForEach(project =>
|
||||
Projects.ForEach(project =>
|
||||
{
|
||||
DotNetPack(s => s
|
||||
.SetProject(project)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageOutputPath>..\..\artifacts</PackageOutputPath>
|
||||
<PackageId>ElectronNET.API</PackageId>
|
||||
<Authors>Gregor Biswanger, Florian Rappl</Authors>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<AssemblyName>dotnet-electronize</AssemblyName>
|
||||
<ToolCommandName>electronize</ToolCommandName>
|
||||
<PackageType>DotnetCliTool</PackageType>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageOutputPath>..\..\artifacts</PackageOutputPath>
|
||||
<PackageId>ElectronNET.CLI</PackageId>
|
||||
<!-- Version 99 is just set for local development stuff to avoid a conflict with "real" packages on NuGet.org -->
|
||||
|
||||
@@ -11,7 +11,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectronNET.CLI", "Electron
|
||||
EndProject
|
||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "ElectronNET.Host", "ElectronNET.Host\", "{B33E9B82-B6B4-4DB0-B6EE-61CC34641518}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
|
||||
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.8"
|
||||
Debug.AspNetCompiler.VirtualPath = "/localhost_56840"
|
||||
Debug.AspNetCompiler.PhysicalPath = "ElectronNET.Host\"
|
||||
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_56840\"
|
||||
|
||||
Reference in New Issue
Block a user