Skip to content

Update Rocket Surgery Other #925

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 21, 2023
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
10 changes: 4 additions & 6 deletions .build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
using Nuke.Common.Tools.MSBuild;
using Rocket.Surgery.Nuke.DotNetCore;

namespace Build;

[PublicAPI]
[CheckBuildProjectConfigurations]
[UnsetVisualStudioEnvironmentVariables]
[PackageIcon("http://www.omnisharp.net/images/logo.png")]
[EnsureReadmeIsUpdated]
[DotNetVerbosityMapping]
[MSBuildVerbosityMapping]
[NuGetVerbosityMapping]
public partial class Solution : NukeBuild,
public sealed partial class Solution : NukeBuild,
ICanRestoreWithDotNetCore,
ICanBuildWithDotNetCore,
ICanTestWithDotNetCore,
Expand All @@ -36,10 +37,7 @@ public partial class Solution : NukeBuild,
/// - Microsoft VisualStudio https://nuke.build/visualstudio
/// - Microsoft VSCode https://nuke.build/vscode
/// </summary>
public static int Main()
{
return Execute<Solution>(x => x.Default);
}
public static int Main() => Execute<Solution>(x => x.Default);

[OptionalGitRepository] public GitRepository? GitRepository { get; }

Expand Down
6 changes: 4 additions & 2 deletions .build/Configuration.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using System.ComponentModel;
using Nuke.Common.Tooling;

namespace Build;

[TypeConverter(typeof(TypeConverter<Configuration>))]
public class Configuration : Enumeration
{
public static readonly Configuration Debug = new Configuration { Value = nameof(Debug) };
public static readonly Configuration Release = new Configuration { Value = nameof(Release) };
public static Configuration Debug => new() { Value = nameof(Debug) };
public static Configuration Release => new() { Value = nameof(Release) };

public static implicit operator string(Configuration configuration) => configuration.Value;
}
9 changes: 4 additions & 5 deletions .build/Solution.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
using System.Collections.Generic;
using System.Linq;
using Nuke.Common.CI.GitHubActions;
using Nuke.Common.CI.GitHubActions.Configuration;
using Rocket.Surgery.Nuke.ContinuousIntegration;
using Rocket.Surgery.Nuke.DotNetCore;
using Rocket.Surgery.Nuke.GithubActions;

namespace Build;

internal class LocalConstants
{
public static string[] PathsIgnore =
public static string[] PathsIgnore => new[]
{
".codecov.yml",
".editorconfig",
Expand Down Expand Up @@ -37,7 +36,7 @@ internal class LocalConstants
GitHubActionsImage.WindowsLatest,
GitHubActionsImage.UbuntuLatest,
AutoGenerate = false,
On = new[] { GitHubActionsTrigger.Push },
On = new[] { RocketSurgeonGitHubActionsTrigger.Push },
OnPushTags = new[] { "v*" },
OnPushBranches = new[] { "master", "main", "next" },
OnPullRequestBranches = new[] { "master", "main", "next" },
Expand All @@ -49,7 +48,7 @@ internal class LocalConstants
GitHubActionsImage.WindowsLatest,
GitHubActionsImage.UbuntuLatest,
AutoGenerate = false,
On = new[] { GitHubActionsTrigger.Push },
On = new[] { RocketSurgeonGitHubActionsTrigger.Push },
OnPushTags = new[] { "v*" },
OnPushBranches = new[] { "master", "main", "next" },
OnPullRequestBranches = new[] { "master", "main", "next" },
Expand Down
4 changes: 2 additions & 2 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Build Schema",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
Expand Down Expand Up @@ -155,4 +155,4 @@
}
}
}
}
}
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="Rocket.Surgery.MSBuild.CI" Version="1.1.1" />
<PackageVersion Include="Rocket.Surgery.MSBuild.SourceLink" Version="1.1.1" />
<PackageVersion Include="Rocket.Surgery.MSBuild.CI" Version="1.1.2" />
<PackageVersion Include="Rocket.Surgery.MSBuild.SourceLink" Version="1.1.2" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
</ItemGroup>
<!-- Samples -->
Expand All @@ -24,7 +24,7 @@
<PackageVersion Include="GitVersion.Tool" Version="5.12.0" />
<PackageVersion Include="JetBrains.ReSharper.CommandLineTools" Version="2023.2.1" />
<PackageVersion Include="ReportGenerator" Version="5.1.25" />
<PackageVersion Include="Rocket.Surgery.Nuke" Version="0.19.1" />
<PackageVersion Include="Rocket.Surgery.Nuke" Version="0.21.1" />
</ItemGroup>
<ItemGroup>
<!-- backwards compat is maintained in Directory.Packages.supports.props -->
Expand Down