Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 1 addition & 58 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Load the recipe
#load nuget:?package=NUnit.Cake.Recipe&version=1.6.0
#load nuget:?package=NUnit.Cake.Recipe&version=2.0.0-beta.3
// Comment out above line and uncomment below for local tests of recipe changes
//#load ../NUnit.Cake.Recipe/recipe/*.cake

Expand Down Expand Up @@ -160,63 +160,6 @@ BuildSettings.Packages.Add(new ChocolateyPackage(
testRunner: new AgentRunner(BuildSettings.ChocolateyTestDirectory + "nunit-extension-net90-pluggable-agent." + BuildSettings.PackageVersion + "/tools/agent/nunit-agent-net90.dll"),
tests: PackageTests));

Task("PublishToNuGet")
.Description("""
Publishes packages to NuGet for an alpha, beta, rc or final release. If not,
or if the --nopush option was used, a message is displayed.
""")
.Does(() =>
{
if (!BuildSettings.ShouldPublishToNuGet)
Information("Nothing to publish to NuGet from this run.");
else if (CommandLineOptions.NoPush)
Information("NoPush option suppressing publication to NuGet");
else
foreach (var package in BuildSettings.Packages)
{
var packageName = $"{package.PackageId}.{BuildSettings.PackageVersion}.nupkg";
var packagePath = BuildSettings.PackageDirectory + packageName;
try
{
if (package.PackageType == PackageType.NuGet)
NuGetPush(packagePath, new NuGetPushSettings() { ApiKey = BuildSettings.NuGetApiKey, Source = BuildSettings.NuGetPushUrl });
}
catch (Exception ex)
{
Error(ex.Message);
throw;
}
}
});

Task("PublishToChocolatey")
.Description("""
Publishes packages to Chocolatey for an alpha, beta, rc or final release.
If not, or if the --nopush option was used, a message is displayed.
""")
.Does(() =>
{
if (!BuildSettings.ShouldPublishToChocolatey)
Information("Nothing to publish to Chocolatey from this run.");
else if (CommandLineOptions.NoPush)
Information("NoPush option suppressing publication to Chocolatey");
else
foreach (var package in BuildSettings.Packages)
{
var packageName = $"{package.PackageId}.{BuildSettings.PackageVersion}.nupkg";
var packagePath = BuildSettings.PackageDirectory + packageName;
try
{
if (package.PackageType == PackageType.Chocolatey)
ChocolateyPush(packagePath, new ChocolateyPushSettings() { ApiKey = BuildSettings.ChocolateyApiKey, Source = BuildSettings.ChocolateyPushUrl });
}
catch (Exception ex)
{
Error(ex.Message);
throw;
}
}
});
//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 4 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>Minimum</AnalysisMode>
</PropertyGroup>
<!-- Common Package Versions -->
<NUnitEngineApiVersion>4.0.0-beta.2</NUnitEngineApiVersion>
<NUnitAgentCoreVersion>4.0.0-beta.2</NUnitAgentCoreVersion>
</PropertyGroup>

</Project>
4 changes: 2 additions & 2 deletions src/agent/nunit-agent-net90.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NUnit.Agent.Core" Version="4.0.0-beta.2" />
<PackageReference Include="NUnit.Engine.Api" Version="4.0.0-beta.2" />
<PackageReference Include="NUnit.Agent.Core" Version="$(NUnitAgentCoreVersion)" />
<PackageReference Include="NUnit.Engine.Api" Version="$(NUnitEngineApiVersion)" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/launcher/nunit-agent-launcher-net90.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NUnit.Engine.Api" Version="4.0.0-beta.2" />
<PackageReference Include="NUnit.Extensibility.Api" Version="4.0.0-beta.2" />
<PackageReference Include="NUnit.Engine.Api" Version="$(NUnitEngineApiVersion)" />
<PackageReference Include="NUnit.Extensibility.Api" Version="$(NUnitEngineApiVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/tests/nunit-agent-launcher-net90.tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<ItemGroup>
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="NUnitLite" Version="4.3.2" />
<PackageReference Include="NUnit.Engine.Api" Version="4.0.0-beta.2" />
<PackageReference Include="NUnit.Engine.Api" Version="$(NUnitEngineApiVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading