Skip to content

Commit 7b522c1

Browse files
committed
Adjusted for NUKE
1 parent b1c08f5 commit 7b522c1

File tree

6 files changed

+37
-39
lines changed

6 files changed

+37
-39
lines changed

.nuke/build.schema.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,12 @@
7878
"enum": [
7979
"Clean",
8080
"Compile",
81-
"CopyFiles",
82-
"CreatePackage",
81+
"CreatePackages",
8382
"Default",
8483
"Package",
8584
"PrePublish",
8685
"Publish",
87-
"PublishPackage",
86+
"PublishPackages",
8887
"PublishPreRelease",
8988
"PublishRelease",
9089
"Restore",
@@ -104,13 +103,12 @@
104103
"enum": [
105104
"Clean",
106105
"Compile",
107-
"CopyFiles",
108-
"CreatePackage",
106+
"CreatePackages",
109107
"Default",
110108
"Package",
111109
"PrePublish",
112110
"Publish",
113-
"PublishPackage",
111+
"PublishPackages",
114112
"PublishPreRelease",
115113
"PublishRelease",
116114
"Restore",

buildReleaseNuGetPackages.cmd

Lines changed: 0 additions & 14 deletions
This file was deleted.

nuke/Build.cs

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ class Build : NukeBuild
6161

6262
string Version { get; set; }
6363

64+
AbsolutePath[] Projects
65+
{
66+
get
67+
{
68+
var api = SourceDirectory / ApiTargetLibName / $"{ApiTargetLibName}.csproj";
69+
var cli = SourceDirectory / CliTargetLibName / $"{CliTargetLibName}.csproj";
70+
var projects = new[] { api, cli };
71+
return projects;
72+
}
73+
}
74+
6475
protected override void OnBuildInitialized()
6576
{
6677
var parser = new ReleaseNotesParser();
@@ -105,40 +116,45 @@ protected override void OnBuildInitialized()
105116
Target Restore => _ => _
106117
.Executes(() =>
107118
{
108-
DotNetRestore(s => s
109-
.SetProjectFile(Solution));
119+
Projects.ForEach(project =>
120+
{
121+
DotNetRestore(s => s
122+
.SetProjectFile(project));
123+
});
110124
});
111125

112126
Target Compile => _ => _
113127
.DependsOn(Restore)
114128
.Executes(() =>
115129
{
116-
DotNetBuild(s => s
117-
.SetProjectFile(Solution)
118-
.SetConfiguration(Configuration)
119-
.EnableNoRestore());
130+
Projects.ForEach(project =>
131+
{
132+
DotNetBuild(s => s
133+
.SetProjectFile(project)
134+
.SetConfiguration(Configuration)
135+
.EnableNoRestore());
136+
});
120137
});
121138

122139
Target RunUnitTests => _ => _
123140
.DependsOn(Compile)
124141
.Executes(() =>
125142
{
126-
DotNetTest(s => s
127-
.SetProjectFile(Solution)
128-
.SetConfiguration(Configuration)
129-
.EnableNoRestore()
130-
.EnableNoBuild());
143+
Projects.ForEach(project =>
144+
{
145+
DotNetTest(s => s
146+
.SetProjectFile(project)
147+
.SetConfiguration(Configuration)
148+
.EnableNoRestore()
149+
.EnableNoBuild());
150+
});
131151
});
132152

133153
Target CreatePackages => _ => _
134154
.DependsOn(Compile)
135155
.Executes(() =>
136156
{
137-
var api = SourceDirectory / ApiTargetLibName / $"{ApiTargetLibName}.csproj";
138-
var cli = SourceDirectory / CliTargetLibName / $"{CliTargetLibName}.csproj";
139-
var projects = new[] { api, cli };
140-
141-
projects.ForEach(project =>
157+
Projects.ForEach(project =>
142158
{
143159
DotNetPack(s => s
144160
.SetProject(project)

src/ElectronNET.API/ElectronNET.API.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFramework>net6.0</TargetFramework>
4-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
54
<PackageOutputPath>..\..\artifacts</PackageOutputPath>
65
<PackageId>ElectronNET.API</PackageId>
76
<Authors>Gregor Biswanger, Florian Rappl</Authors>

src/ElectronNET.CLI/ElectronNET.CLI.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<AssemblyName>dotnet-electronize</AssemblyName>
66
<ToolCommandName>electronize</ToolCommandName>
77
<PackageType>DotnetCliTool</PackageType>
8-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
98
<PackageOutputPath>..\..\artifacts</PackageOutputPath>
109
<PackageId>ElectronNET.CLI</PackageId>
1110
<!-- Version 99 is just set for local development stuff to avoid a conflict with "real" packages on NuGet.org -->

src/ElectronNET.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElectronNET.CLI", "Electron
1111
EndProject
1212
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "ElectronNET.Host", "ElectronNET.Host\", "{B33E9B82-B6B4-4DB0-B6EE-61CC34641518}"
1313
ProjectSection(WebsiteProperties) = preProject
14-
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
14+
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.8"
1515
Debug.AspNetCompiler.VirtualPath = "/localhost_56840"
1616
Debug.AspNetCompiler.PhysicalPath = "ElectronNET.Host\"
1717
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_56840\"

0 commit comments

Comments
 (0)