diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd216ff..3c613e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,7 +122,7 @@ jobs: - name: Setup .Net uses: actions/setup-dotnet@v3 with: - dotnet-version: 9.0.100 + dotnet-version: 10.x - name: Restore run: dotnet restore - name: Build diff --git a/.github/workflows/prLinter.yml b/.github/workflows/prLinter.yml index a67f18d..95d87f1 100644 --- a/.github/workflows/prLinter.yml +++ b/.github/workflows/prLinter.yml @@ -111,19 +111,17 @@ jobs: - name: Check For Associated Issues Or Tasks id: check_for_issues_or_tasks if: ${{ steps.get_pr_info.outputs.prOwner != 'dependabot[bot]' }} + env: + PR_BODY: ${{ steps.get_pr_info.outputs.description }} run: >2- - PR_BODY="${{ steps.get_pr_info.outputs.description }}" - echo "::notice::Raw PR Body: $PR_BODY" - - if [[ -z "$PR_BODY" ]]; then + if [[ -z "${PR_BODY:-}" ]]; then echo "Error: PR description does not contain any links to issue(s)/task(s) (e.g., 'closes #123' / 'closes AB#123' / 'fixes #123' / 'fixes AB#123')." exit 1 fi - PR_BODY=$(echo "$PR_BODY" | tr -s '\r\n' ' ' | tr '\n' ' ' | xargs) - echo "::notice::Normalized PR Body: $PR_BODY" + NORMALIZED_PR_BODY=$(printf '%s' "$PR_BODY" | tr '\r\n' ' ' | tr -s ' ') - if echo "$PR_BODY" | grep -Piq "((close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)\s*(\[#\d+\]|\#\d+)|(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)\s*(\[AB#\d+\]|AB#\d+))"; then + if printf '%s' "$NORMALIZED_PR_BODY" | grep -Piq "(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)\s*(\[#[0-9]+\]|#[0-9]+|\[AB#[0-9]+\]|AB#[0-9]+)"; then echo "Valid PR description." else echo "Error: PR description does not contain any links to issue(s)/task(s) (e.g., 'closes #123' / 'closes AB#123' / 'fixes #123' / 'fixes AB#123')." diff --git a/ADotNet.Infrastructure.Build/ADotNet.Infrastructure.Build.csproj b/ADotNet.Infrastructure.Build/ADotNet.Infrastructure.Build.csproj index af7ae87..4daa7c0 100644 --- a/ADotNet.Infrastructure.Build/ADotNet.Infrastructure.Build.csproj +++ b/ADotNet.Infrastructure.Build/ADotNet.Infrastructure.Build.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 false diff --git a/ADotNet.Infrastructure.Build/Program.cs b/ADotNet.Infrastructure.Build/Program.cs index dc56517..ac0a076 100644 --- a/ADotNet.Infrastructure.Build/Program.cs +++ b/ADotNet.Infrastructure.Build/Program.cs @@ -17,7 +17,7 @@ static void Main(string[] args) scriptGenerationService.GenerateBuildScript( branchName: "main", projectName: "ADotNet", - dotNetVersion: "9.0.100"); + dotNetVersion: "10.x"); scriptGenerationService.GeneratePrLintScript(branchName: "main"); } diff --git a/ADotNet.sln b/ADotNet.sln deleted file mode 100644 index 0bb8550..0000000 --- a/ADotNet.sln +++ /dev/null @@ -1,49 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31423.177 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ADotNet", "ADotNet\ADotNet.csproj", "{9B591D45-CC57-489D-8C57-715A5756984E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ADotNet.Tests.Unit", "AdoNet.Tests.Unit\ADotNet.Tests.Unit.csproj", "{BCB9A79D-B803-440A-9DBA-A9DDD96F618F}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ADotNet.Tests.Console", "AdoNet.Tests.Console\ADotNet.Tests.Console.csproj", "{C416965F-AF57-44A7-A6FA-CA8E9A326979}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ADotNet.Infrastructure.Build", "ADotNet.Infrastructure.Build\ADotNet.Infrastructure.Build.csproj", "{DBB401B4-A819-45FE-98A5-8CAE6F7B58DF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{16CB1804-3040-41F0-9C1F-99A139B24873}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - .github\workflows\build.yml = .github\workflows\build.yml - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9B591D45-CC57-489D-8C57-715A5756984E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9B591D45-CC57-489D-8C57-715A5756984E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9B591D45-CC57-489D-8C57-715A5756984E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9B591D45-CC57-489D-8C57-715A5756984E}.Release|Any CPU.Build.0 = Release|Any CPU - {BCB9A79D-B803-440A-9DBA-A9DDD96F618F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BCB9A79D-B803-440A-9DBA-A9DDD96F618F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BCB9A79D-B803-440A-9DBA-A9DDD96F618F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BCB9A79D-B803-440A-9DBA-A9DDD96F618F}.Release|Any CPU.Build.0 = Release|Any CPU - {C416965F-AF57-44A7-A6FA-CA8E9A326979}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C416965F-AF57-44A7-A6FA-CA8E9A326979}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C416965F-AF57-44A7-A6FA-CA8E9A326979}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C416965F-AF57-44A7-A6FA-CA8E9A326979}.Release|Any CPU.Build.0 = Release|Any CPU - {DBB401B4-A819-45FE-98A5-8CAE6F7B58DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DBB401B4-A819-45FE-98A5-8CAE6F7B58DF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DBB401B4-A819-45FE-98A5-8CAE6F7B58DF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DBB401B4-A819-45FE-98A5-8CAE6F7B58DF}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {EFED117A-5EEB-4587-A445-6945DE3050D3} - EndGlobalSection -EndGlobal diff --git a/ADotNet.slnx b/ADotNet.slnx new file mode 100644 index 0000000..90c3995 --- /dev/null +++ b/ADotNet.slnx @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ADotNet/ADotNet.csproj b/ADotNet/ADotNet.csproj index 1898b77..261164f 100644 --- a/ADotNet/ADotNet.csproj +++ b/ADotNet/ADotNet.csproj @@ -1,7 +1,7 @@  - netstandard2.0;netstandard2.1 + netstandard2.0;netstandard2.1;net10.0 11.0 Copyright (c) The Standard Community @@ -57,9 +57,9 @@ - - - + + + diff --git a/ADotNet/Models/Pipelines/GithubPipelines/DotNets/RequireIssueOrTaskJob.cs b/ADotNet/Models/Pipelines/GithubPipelines/DotNets/RequireIssueOrTaskJob.cs index cbbbab9..346f26a 100644 --- a/ADotNet/Models/Pipelines/GithubPipelines/DotNets/RequireIssueOrTaskJob.cs +++ b/ADotNet/Models/Pipelines/GithubPipelines/DotNets/RequireIssueOrTaskJob.cs @@ -63,20 +63,20 @@ public RequireIssueOrTaskJob() If = "${{ steps.get_pr_info.outputs.prOwner != 'dependabot[bot]' }}", Id = "check_for_issues_or_tasks", Shell = "bash", + EnvironmentVariables = new Dictionary + { + { "PR_BODY", "${{ steps.get_pr_info.outputs.description }}" } + }, Run = """ - PR_BODY="${{ steps.get_pr_info.outputs.description }}" - echo "::notice::Raw PR Body: $PR_BODY" - - if [[ -z "$PR_BODY" ]]; then + if [[ -z "${PR_BODY:-}" ]]; then echo "Error: PR description does not contain any links to issue(s)/task(s) (e.g., 'closes #123' / 'closes AB#123' / 'fixes #123' / 'fixes AB#123')." exit 1 fi - PR_BODY=$(echo "$PR_BODY" | tr -s '\r\n' ' ' | tr '\n' ' ' | xargs) - echo "::notice::Normalized PR Body: $PR_BODY" + NORMALIZED_PR_BODY=$(printf '%s' "$PR_BODY" | tr '\r\n' ' ' | tr -s ' ') - if echo "$PR_BODY" | grep -Piq "((close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)\s*(\[#\d+\]|\#\d+)|(?:close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)\s*(\[AB#\d+\]|AB#\d+))"; then + if printf '%s' "$NORMALIZED_PR_BODY" | grep -Piq "(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)\s*(\[#[0-9]+\]|#[0-9]+|\[AB#[0-9]+\]|AB#[0-9]+)"; then echo "Valid PR description." else echo "Error: PR description does not contain any links to issue(s)/task(s) (e.g., 'closes #123' / 'closes AB#123' / 'fixes #123' / 'fixes AB#123')." diff --git a/AdoNet.Tests.Console/ADotNet.Tests.Console.csproj b/AdoNet.Tests.Console/ADotNet.Tests.Console.csproj index 2880879..7bad0d0 100644 --- a/AdoNet.Tests.Console/ADotNet.Tests.Console.csproj +++ b/AdoNet.Tests.Console/ADotNet.Tests.Console.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 false diff --git a/AdoNet.Tests.Unit/ADotNet.Tests.Unit.csproj b/AdoNet.Tests.Unit/ADotNet.Tests.Unit.csproj index 9d704dd..c30500f 100644 --- a/AdoNet.Tests.Unit/ADotNet.Tests.Unit.csproj +++ b/AdoNet.Tests.Unit/ADotNet.Tests.Unit.csproj @@ -1,21 +1,22 @@ - net9.0 + net10.0 false - - - - - - + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/AdoNet.Tests.Unit/Services/Builds/BuildServiceTests.cs b/AdoNet.Tests.Unit/Services/Builds/BuildServiceTests.cs index 36e9775..c67c400 100644 --- a/AdoNet.Tests.Unit/Services/Builds/BuildServiceTests.cs +++ b/AdoNet.Tests.Unit/Services/Builds/BuildServiceTests.cs @@ -42,7 +42,7 @@ private static string GetRandomFilePath() => private static string GetRandomString() => new MnemonicString().GetValue(); - public static TheoryData FileValidationExceptions() + public static TheoryData FileValidationExceptions() { return new TheoryData { @@ -53,7 +53,7 @@ public static TheoryData FileValidationExceptions() }; } - public static TheoryData FileDependencyExceptions() + public static TheoryData FileDependencyExceptions() { return new TheoryData { diff --git a/AdoNet.Tests.Unit/Services/Foundations/Files/FileServiceTests.cs b/AdoNet.Tests.Unit/Services/Foundations/Files/FileServiceTests.cs index 058d7a9..91e9b1a 100644 --- a/AdoNet.Tests.Unit/Services/Foundations/Files/FileServiceTests.cs +++ b/AdoNet.Tests.Unit/Services/Foundations/Files/FileServiceTests.cs @@ -26,7 +26,7 @@ public FileServiceTests() filesBroker: this.filesBrokerMock.Object); } - public static TheoryData FileDependencyValidationExceptions() + public static TheoryData FileDependencyValidationExceptions() { return new TheoryData() {