Skip to content
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

Added repository updates to move to GlobalPackageReferences, as well … #1215

Merged
merged 6 commits into from
Sep 4, 2024
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
17 changes: 0 additions & 17 deletions .appveyor.yml

This file was deleted.

29 changes: 14 additions & 15 deletions .build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
[UnsetVisualStudioEnvironmentVariables]
[PackageIcon("https://raw.githubusercontent.com/RocketSurgeonsGuild/graphics/master/png/social-square-thrust-rounded.png")]
[EnsureGitHooks(GitHook.PreCommit)]
[EnsureReadmeIsUpdated("Readme.md")]
[DotNetVerbosityMapping]
[MSBuildVerbosityMapping]
[NuGetVerbosityMapping]
Expand All @@ -28,15 +27,11 @@ public partial class Pipeline : NukeBuild,
ICanPackWithDotNetCore,
IHaveDataCollector,
ICanClean,
ICanLintStagedFiles,
ICanDotNetFormat,
ICanPrettier,
IHaveCommonLintTargets,
IHavePublicApis,
ICanUpdateReadme,
IGenerateCodeCoverageReport,
IGenerateCodeCoverageSummary,
IGenerateCodeCoverageBadges,
ICanRegenerateBuildConfiguration,
IHaveConfiguration<Configuration>
{
/// <summary>
Expand All @@ -57,20 +52,24 @@ public static int Main()
.DependsOn(Test)
.DependsOn(Pack);

public Target Build => _ => _.Inherit<ICanBuildWithDotNetCore>(x => x.CoreBuild);

public Target Pack => _ => _.Inherit<ICanPackWithDotNetCore>(x => x.CorePack)
.DependsOn(Clean);

public Target Clean => _ => _.Inherit<ICanClean>(x => x.Clean);
public Target Build => _ => _;
public Target Pack => _ => _;
public Target Clean => _ => _;
public Target Lint => _ => _.Inherit<ICanLint>(x => x.Lint);
public Target Restore => _ => _.Inherit<ICanRestoreWithDotNetCore>(x => x.CoreRestore);
public Target Test => _ => _.Inherit<ICanTestWithDotNetCore>(x => x.CoreTest);
public Target Restore => _ => _;
public Target Test => _ => _;

/// <summary>
/// Only run the JetBrains cleanup code when running on the server
/// </summary>
public Target JetBrainsCleanupCode => _ => _
.Inherit<ICanDotNetFormat>(x => x.JetBrainsCleanupCode)
.OnlyWhenStatic(() => IsServerBuild);

[Solution(GenerateProjects = true)] private Solution Solution { get; } = null!;
Nuke.Common.ProjectModel.Solution IHaveSolution.Solution => Solution;

[OptionalGitRepository] public GitRepository? GitRepository { get; }
[ComputedGitVersion] public GitVersion GitVersion { get; } = null!;
[GitVersion(NoFetch = true, NoCache = false)] public GitVersion GitVersion { get; } = null!;
[Parameter("Configuration to build")] public Configuration Configuration { get; } = IsLocalBuild ? Configuration.Debug : Configuration.Release;
}
92 changes: 60 additions & 32 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,62 @@
{
"version": 1,
"isRoot": true,
"tools": {
"gitversion.tool": {
"version": "6.0.2",
"commands": ["dotnet-gitversion"]
},
"dotnet-reportgenerator-globaltool": {
"version": "5.3.9",
"commands": ["reportgenerator"]
},
"nuke.globaltool": {
"version": "8.0.0",
"commands": ["nuke"]
},
"codecov.tool": {
"version": "1.13.0",
"commands": ["codecov"]
},
"jetbrains.resharper.globaltools": {
"version": "2024.2.3",
"commands": ["jb"]
},
"nukeeper": {
"version": "0.35.0",
"commands": ["nukeeper"]
},
"dotnet-outdated-tool": {
"version": "4.6.4",
"commands": ["dotnet-outdated"]
}
"version": 1,
"isRoot": true,
"tools": {
"gitversion.tool": {
"version": "6.0.2",
"commands": [
"dotnet-gitversion"
],
"rollForward": false
},
"dotnet-reportgenerator-globaltool": {
"version": "5.3.9",
"commands": [
"reportgenerator"
],
"rollForward": false
},
"nuke.globaltool": {
"version": "8.0.0",
"commands": [
"nuke"
],
"rollForward": false
},
"codecov.tool": {
"version": "1.13.0",
"commands": [
"codecov"
],
"rollForward": false
},
"jetbrains.resharper.globaltools": {
"version": "2024.2.3",
"commands": [
"jb"
],
"rollForward": false
},
"nukeeper": {
"version": "0.35.0",
"commands": [
"nukeeper"
],
"rollForward": false
},
"dotnet-outdated-tool": {
"version": "4.6.4",
"commands": [
"dotnet-outdated"
],
"rollForward": false
},
"husky": {
"version": "0.7.1",
"commands": [
"husky"
],
"rollForward": false
}
}
}
}
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ jobs:
- name: 🎁 Restore
id: restore
run: |
dotnet nuke Restore --skip
dotnet nuke DotnetCoreRestore Restore --skip
- name: ⚙️ Build
id: build
run: |
dotnet nuke Build --skip
dotnet nuke DotnetCoreBuild Build --skip
- name: 🚦 Test
id: test
run: |
dotnet nuke Test TriggerCodeCoverageReports GenerateCodeCoverageReportCobertura GenerateCodeCoverageBadges GenerateCodeCoverageSummary GenerateCodeCoverageReport --skip
dotnet nuke DotnetCoreTest Test TriggerCodeCoverageReports GenerateCodeCoverageReportCobertura GenerateCodeCoverageBadges GenerateCodeCoverageSummary GenerateCodeCoverageReport --skip
- name: 📦 Pack
id: pack
run: |
dotnet nuke Pack --skip
dotnet nuke DotnetCorePack Pack --skip
- name: 🏺 Publish coverage data
if: always()
uses: actions/upload-artifact@v4
Expand Down
47 changes: 40 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ jobs:
id: commit-message
run: |
echo "message=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT"
- name: npm ci
run: |
npm ci --ignore-scripts
- name: 🔨 Use .NET Core 6.0 SDK
uses: actions/setup-dotnet@v4
with:
Expand All @@ -74,18 +71,54 @@ jobs:
- name: ⚒️ dotnet tool restore
run: |
dotnet tool restore
- name: 🎁 Restore
id: restore
run: |
dotnet nuke DotnetCoreRestore Restore --skip
- name: Lint
id: lint
run: |
dotnet nuke Lint --skip
- name: Regenerate Build Configurations
id: regenerateBuildConfigurations
run: |
dotnet nuke RegenerateBuildConfigurations --skip
- name: Lint Staged
id: lintStaged
- name: Lint Public Api Analyzers
id: lintPublicApiAnalyzers
run: |
dotnet nuke LintPublicApiAnalyzers --skip
- name: Prettier
id: prettier
run: |
dotnet nuke Prettier --skip
- name: Dotnet Format
id: dotnetFormat
run: |
dotnet nuke DotnetFormat --skip
- name: Jet Brains Cleanup Code
id: jetBrainsCleanupCode
run: |
dotnet nuke JetBrainsCleanupCode --skip
- name: Generate Solution Items
id: generateSolutionItems
run: |
dotnet nuke GenerateSolutionItems --skip
- name: Generate Readme
id: generateReadme
run: |
dotnet nuke GenerateReadme --skip
- name: Move Unshipped to Shipped
id: moveUnshippedToShipped
run: |
dotnet nuke MoveUnshippedToShipped --skip
- name: Lint Git Add
id: lintGitAdd
run: |
dotnet nuke LintStaged --skip
dotnet nuke LintGitAdd --skip
- name: Add & Commit
env:
GITHUB_TOKEN: '${{ secrets.RSG_BOT_TOKEN }}'
if: "'${{ steps.commit-message.outputs.message }}' == 'Automatically linting code'"
if: "contains('${{ steps.commit-message.outputs.message }}', 'Automatically linting code')"
uses: planetscale/[email protected]
with:
commit_message: 'Automatically linting code'
Expand Down
7 changes: 2 additions & 5 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

output=$(git diff --cached --name-only | wc -l)
if [ $output -gt 0 ]; then
dotnet nuke lint-staged
fi

dotnet nuke lint
dotnet husky run --group pre-commit
5 changes: 5 additions & 0 deletions .husky/task-runner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://alirezanet.github.io/Husky.Net/schema.json",
"variables": [],
"tasks": []
}
9 changes: 0 additions & 9 deletions .lintstagedrc.js

This file was deleted.

28 changes: 16 additions & 12 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,25 @@
"enum": [
"Build",
"Clean",
"CoreBuild",
"CorePack",
"CoreRestore",
"CoreTest",
"CleanWellKnownTemporaryFiles",
"Default",
"DotNetFormat",
"DotnetCoreBuild",
"DotnetCorePack",
"DotnetCoreRestore",
"DotnetCoreTest",
"DotnetFormat",
"DotnetToolRestore",
"GenerateCodeCoverageBadges",
"GenerateCodeCoverageReport",
"GenerateCodeCoverageReportCobertura",
"GenerateCodeCoverageSummary",
"GenerateReadme",
"GenerateSolutionItems",
"HuskyLint",
"JetBrainsCleanupCode",
"Lint",
"LintGitAdd",
"LintPublicApiAnalyzers",
"LintStaged",
"MoveUnshippedToShipped",
"Pack",
"PostLint",
Expand All @@ -130,23 +132,25 @@
"enum": [
"Build",
"Clean",
"CoreBuild",
"CorePack",
"CoreRestore",
"CoreTest",
"CleanWellKnownTemporaryFiles",
"Default",
"DotNetFormat",
"DotnetCoreBuild",
"DotnetCorePack",
"DotnetCoreRestore",
"DotnetCoreTest",
"DotnetFormat",
"DotnetToolRestore",
"GenerateCodeCoverageBadges",
"GenerateCodeCoverageReport",
"GenerateCodeCoverageReportCobertura",
"GenerateCodeCoverageSummary",
"GenerateReadme",
"GenerateSolutionItems",
"HuskyLint",
"JetBrainsCleanupCode",
"Lint",
"LintGitAdd",
"LintPublicApiAnalyzers",
"LintStaged",
"MoveUnshippedToShipped",
"Pack",
"PostLint",
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
Tags
-->
<LangVersion>preview</LangVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<Features>strict</Features>
<Nullable>enable</Nullable>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
Expand Down Expand Up @@ -48,5 +47,6 @@
<ItemGroup>
<Using Include="JetBrains.Annotations" />
<Using Include="System.Diagnostics.CodeAnalysis" />
<Using Include="System.Diagnostics.CodeAnalysis.NotNullAttribute" Alias="NotNullAttribute" />
</ItemGroup>
</Project>
Loading
Loading