diff --git a/.github/renovate.json b/.github/renovate.json index 8588d1cbd..b24bd3681 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -2,5 +2,13 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "github>cake-contrib/renovate-presets:cake-issues" + ], + "packageRules": [ + { + "description": "Do not update Microsoft.Build.* packages in Cake.Issues.MsBuild since required version depends on the version used in MSBuild.StructuredLogger", + "matchFileNames": ["src/Cake.Issues.MsBuild/Cake.Issues.MsBuild.csproj"], + "matchDepNames": ["Microsoft.Build.Framework", "Microsoft.Build.Utilities.Core"], + "enabled": false + } ] } diff --git a/.github/workflows/build.yml b/.github/workflows/integrationtests.yml similarity index 62% rename from .github/workflows/build.yml rename to .github/workflows/integrationtests.yml index 9292494e8..bb092fcd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/integrationtests.yml @@ -1,4 +1,4 @@ -name: Build and tests +name: Integration tests # Workflow Trigger on: @@ -32,10 +32,39 @@ jobs: run: ./build.sh shell: bash - name: Publish NuGet package as build artifact - uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4 + uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4 with: name: NuGet Package path: ./BuildArtifacts/Packages/NuGet/ + # Integration Tests Cake.Issues.MsBuild Cake Scripting + IntegrationTestsMsBuildCakeScripting: + name: Integration Tests Cake.Issues.MsBuild Cake Scripting + needs: Build + strategy: + fail-fast: false + matrix: + os: [ + windows-2019, windows-2022, + ubuntu-20.04, ubuntu-22.04, + macos-11, macos-14] + dotnet: [6.x, 7.x, 8.x] + runs-on: ${{ matrix.os }} + steps: + - name: Get the sources + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - name: Download build artifact + uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4 + with: + name: NuGet Package + path: ./BuildArtifacts/Packages/NuGet + - name: Install .NET + uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4 + with: + dotnet-version: ${{ matrix.dotnet }} + - name: Run integration tests + run: ./build.sh --verbosity=diagnostic + working-directory: ./tests/Cake.Issues.MsBuild/script-runner/ + shell: bash # Integration Tests Cake.Issues.PullRequests.GitHubActions Cake Scripting IntegrationTestsPullRequestsGitHubActionsCakeScripting: name: Integration Tests Cake.Issues.PullRequests.GitHubActions Cake Scripting @@ -54,7 +83,7 @@ jobs: - name: Get the sources uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - name: Download build artifact - uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4 + uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4 with: name: NuGet Package path: ./BuildArtifacts/Packages/NuGet diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml new file mode 100644 index 000000000..096d3b73d --- /dev/null +++ b/.github/workflows/unittests.yml @@ -0,0 +1,40 @@ +name: Unit tests + +# Workflow Trigger +on: + # Trigger the workflow on a pull request to any branch + pull_request: + # Triggers the workflow in the event there is a push to master + push: + branches: + - master + +jobs: + Test: + name: Run unit tests + strategy: + fail-fast: false + matrix: + os: [ + windows-2019, windows-2022, + ubuntu-20.04, ubuntu-22.04, + # Cake.Recipe currently does not support macOS 14 (M1) + macos-11, macos-13] + runs-on: ${{ matrix.os }} + steps: + - name: Get the sources + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 + - name: Fetch all tags and branches + run: git fetch --prune --unshallow + - name: Install .NET + uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4 + with: + # .NET 5 required for GitVersion + dotnet-version: | + 5.x + 6.x + 7.x + 8.x + - name: Test + run: ./build.sh --target=Test + shell: bash \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 243e45f49..a5b8f0e22 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,10 +11,24 @@ pr: stages: - stage: BuildStage - displayName: Build + displayName: Full Build + dependsOn: [] jobs: - job: BuildJob - displayName: Build & Unit Tests + displayName: Build + pool: + vmImage: 'windows-2022' + steps: + - template: .azuredevops/pipelines/templates/steps/install-required-dotnet-versions-for-building.yml + - bash: ./build.sh + displayName: 'Build & Run Unit Tests' + +- stage: UnitTestStage + displayName: Unit Tests + dependsOn: [] + jobs: + - job: UnitTestJob + displayName: Unit Tests strategy: matrix: Windows: @@ -27,16 +41,28 @@ stages: vmImage: $(imageName) steps: - template: .azuredevops/pipelines/templates/steps/install-required-dotnet-versions-for-building.yml - - bash: ./build.sh + - bash: ./build.sh --target=Test + displayName: 'Run Unit Tests' + +- stage: IntegrationTestsBuildStage + displayName: Build + dependsOn: [] + jobs: + - job: CreateNuGetPackagesJob + displayName: Create NuGet Packages + pool: + vmImage: 'ubuntu-22.04' + steps: + - template: .azuredevops/pipelines/templates/steps/install-required-dotnet-versions-for-building.yml + - bash: ./build.sh --target=Create-NuGet-Packages displayName: 'Build & Run Unit Tests' - publish: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet artifact: NuGet Package displayName: 'Publish NuGet package as build artifact' - condition: eq( variables['System.JobName'], 'Windows' ) - stage: IntegrationTestsGitRepositoryStage displayName: Integration Tests Cake.Issues.GitRepository - dependsOn: BuildStage + dependsOn: IntegrationTestsBuildStage jobs: - job: TestGitRepositoryScriptingJob displayName: Test Cake Scripting @@ -68,7 +94,7 @@ stages: - stage: IntegrationTestsMarkdownlintStage displayName: Integration Tests Cake.Issues.Markdownlint - dependsOn: BuildStage + dependsOn: IntegrationTestsBuildStage jobs: - job: TestMarkdownlintJob displayName: Test @@ -99,9 +125,38 @@ stages: artifact: Integration Tests Cake.Issues.Markdownlint $(System.JobName) displayName: 'Publish generated reports as build artifact' +- stage: IntegrationTestsMsBuildStage + displayName: Integration Tests Cake.Issues.MsBuild + dependsOn: IntegrationTestsBuildStage + jobs: + - job: TestMsBuildJob + displayName: Test + strategy: + matrix: + Windows_Server_2019: + imageName: 'windows-2019' + Windows_Server_2022: + imageName: 'windows-2022' + macOS_11: + imageName: 'macOS-11' + macOS_13: + imageName: 'macOS-13' + Ubuntu_20_04: + imageName: 'ubuntu-20.04' + Ubuntu_22_04: + imageName: 'ubuntu-22.04' + pool: + vmImage: $(imageName) + steps: + - template: .azuredevops/pipelines/templates/steps/install-net6.yml + - template: .azuredevops/pipelines/templates/steps/provide-nuget-packages.yml + - powershell: ./build.ps1 --verbosity=diagnostic + workingDirectory: ./tests/Cake.Issues.MsBuild/script-runner + displayName: 'Run integration tests' + - stage: IntegrationTestsReportingConsoleStage displayName: Integration Tests Cake.Issues.Reporting.Console - dependsOn: BuildStage + dependsOn: IntegrationTestsBuildStage jobs: - job: TestReportingConsoleScriptingJob displayName: Test Cake Scripting @@ -154,7 +209,7 @@ stages: - stage: IntegrationTestsReportingGenericStage displayName: Integration Tests Cake.Issues.Reporting.Generic - dependsOn: BuildStage + dependsOn: IntegrationTestsBuildStage jobs: - job: TestReportingGenericScriptingJob displayName: Test Cake Scripting @@ -215,7 +270,7 @@ stages: - stage: IntegrationTestsReportingSarifStage displayName: Integration Tests Cake.Issues.Reporting.Sarif - dependsOn: BuildStage + dependsOn: IntegrationTestsBuildStage jobs: - job: TestReportingSarifScriptingJob displayName: Test Cake Scripting diff --git a/nuspec/nuget/Cake.Frosting.Issues.DocFx.nuspec b/nuspec/nuget/Cake.Frosting.Issues.DocFx.nuspec index fcbf33356..1ce485d54 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.DocFx.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.DocFx.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.DocFx. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider linting docfx - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.EsLint.nuspec b/nuspec/nuget/Cake.Frosting.Issues.EsLint.nuspec index b970929d9..7f773635b 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.EsLint.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.EsLint.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.EsLint. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider code-analysis javascript linting eslint - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.GitRepository.nuspec b/nuspec/nuget/Cake.Frosting.Issues.GitRepository.nuspec index 8c0bd152a..906355f8b 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.GitRepository.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.GitRepository.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.GitRepository. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider code-analysis linting git - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.InspectCode.nuspec b/nuspec/nuget/Cake.Frosting.Issues.InspectCode.nuspec index 2d1b46469..a12019d9b 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.InspectCode.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.InspectCode.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.InspectCode. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider codeanalysis linting inspectcode - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.Markdownlint.nuspec b/nuspec/nuget/Cake.Frosting.Issues.Markdownlint.nuspec index a0e2b65ec..52bd258ce 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.Markdownlint.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.Markdownlint.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.Markdownlint. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider linting markdown markdownlint - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.MsBuild.nuspec b/nuspec/nuget/Cake.Frosting.Issues.MsBuild.nuspec index 08038f90c..6eb07219a 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.MsBuild.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.MsBuild.nuspec @@ -29,22 +29,22 @@ For addin compatible with Cake Script Runners see Cake.Issues.MsBuild. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider code-analysis linting msbuild - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 - + - + - + diff --git a/nuspec/nuget/Cake.Frosting.Issues.PullRequests.AppVeyor.nuspec b/nuspec/nuget/Cake.Frosting.Issues.PullRequests.AppVeyor.nuspec index 10e1bbafb..633294688 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.PullRequests.AppVeyor.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.PullRequests.AppVeyor.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.PullRequests.AppVe Copyright © Cake Issues contributors cake cake-addin cake-issues cake-pullrequestsystem issues pullrequest buildserver appveyor - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.PullRequests.AzureDevOps.nuspec b/nuspec/nuget/Cake.Frosting.Issues.PullRequests.AzureDevOps.nuspec index 5b5e96222..7f905e7f9 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.PullRequests.AzureDevOps.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.PullRequests.AzureDevOps.nuspec @@ -27,7 +27,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.PullRequests.Azure Copyright © Cake Issues contributors cake cake-addin cake-issues cake-pullrequestsystem issues pullrequest tfs azure-devops azure-devops-server - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.PullRequests.GitHubActions.nuspec b/nuspec/nuget/Cake.Frosting.Issues.PullRequests.GitHubActions.nuspec index b6bbb2b99..c306a5911 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.PullRequests.GitHubActions.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.PullRequests.GitHubActions.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.PullRequests.GitHu Copyright © Cake Issues contributors cake cake-addin cake-issues cake-pullrequestsystem issues pullrequest buildserver github github-actions - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.PullRequests.nuspec b/nuspec/nuget/Cake.Frosting.Issues.PullRequests.nuspec index ca740c3ae..87178c381 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.PullRequests.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.PullRequests.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.PullRequests. Copyright © Cake Issues contributors Cake Script Cake-Issues CodeAnalysis Linting Issues Pull-Requests - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.Reporting.Console.nuspec b/nuspec/nuget/Cake.Frosting.Issues.Reporting.Console.nuspec index 9767bcfc3..e180ffdfd 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.Reporting.Console.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.Reporting.Console.nuspec @@ -28,7 +28,7 @@ The addin requires Cake Frosting 1.2.0 or higher. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-reportformat issues reporting console - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.Reporting.Generic.nuspec b/nuspec/nuget/Cake.Frosting.Issues.Reporting.Generic.nuspec index 527b93868..e95d590b4 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.Reporting.Generic.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.Reporting.Generic.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.Reporting.Generic. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-reportformat issues reporting html markdown razor - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.Reporting.Sarif.nuspec b/nuspec/nuget/Cake.Frosting.Issues.Reporting.Sarif.nuspec index 6e1c1a20d..cbd7c518c 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.Reporting.Sarif.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.Reporting.Sarif.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.Reporting.Sarif. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-reportformat issues reporting sarif - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.Reporting.nuspec b/nuspec/nuget/Cake.Frosting.Issues.Reporting.nuspec index 0362e13f8..0c180b85c 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.Reporting.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.Reporting.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.Reporting. Copyright © Cake Issues contributors Cake Script Cake-Issues CodeAnalysis Linting Issues Reporting - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.Sarif.nuspec b/nuspec/nuget/Cake.Frosting.Issues.Sarif.nuspec index 4e06463d2..e7c28bf4d 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.Sarif.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.Sarif.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.Sarif. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider linting sarif - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Frosting.Issues.Terraform.nuspec b/nuspec/nuget/Cake.Frosting.Issues.Terraform.nuspec index 22ccb3387..2918e1e05 100644 --- a/nuspec/nuget/Cake.Frosting.Issues.Terraform.nuspec +++ b/nuspec/nuget/Cake.Frosting.Issues.Terraform.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Script Runners see Cake.Issues.Terraform. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider linting terraform - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.DocFx.nuspec b/nuspec/nuget/Cake.Issues.DocFx.nuspec index 7780e5a6f..5893bd406 100644 --- a/nuspec/nuget/Cake.Issues.DocFx.nuspec +++ b/nuspec/nuget/Cake.Issues.DocFx.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.DocFx. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider linting docfx - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.EsLint.nuspec b/nuspec/nuget/Cake.Issues.EsLint.nuspec index a44b15678..149c5462e 100644 --- a/nuspec/nuget/Cake.Issues.EsLint.nuspec +++ b/nuspec/nuget/Cake.Issues.EsLint.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.EsLint. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider code-analysis javascript linting eslint - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.GitRepository.nuspec b/nuspec/nuget/Cake.Issues.GitRepository.nuspec index 62c46cc35..5d6edf9b7 100644 --- a/nuspec/nuget/Cake.Issues.GitRepository.nuspec +++ b/nuspec/nuget/Cake.Issues.GitRepository.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.GitRepository. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider code-analysis linting git - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.InspectCode.nuspec b/nuspec/nuget/Cake.Issues.InspectCode.nuspec index f3cf21a58..96ba4c677 100644 --- a/nuspec/nuget/Cake.Issues.InspectCode.nuspec +++ b/nuspec/nuget/Cake.Issues.InspectCode.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.InspectCode. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider codeanalysis linting inspectcode - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.Markdownlint.nuspec b/nuspec/nuget/Cake.Issues.Markdownlint.nuspec index 27e5795bc..0c19604a4 100644 --- a/nuspec/nuget/Cake.Issues.Markdownlint.nuspec +++ b/nuspec/nuget/Cake.Issues.Markdownlint.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.Markdownlint. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider linting markdown markdownlint - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.MsBuild.nuspec b/nuspec/nuget/Cake.Issues.MsBuild.nuspec index d294b48ea..05d2555d2 100644 --- a/nuspec/nuget/Cake.Issues.MsBuild.nuspec +++ b/nuspec/nuget/Cake.Issues.MsBuild.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.MsBuild. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider code-analysis linting msbuild - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.PullRequests.AppVeyor.nuspec b/nuspec/nuget/Cake.Issues.PullRequests.AppVeyor.nuspec index 058a1ad82..a4af1278f 100644 --- a/nuspec/nuget/Cake.Issues.PullRequests.AppVeyor.nuspec +++ b/nuspec/nuget/Cake.Issues.PullRequests.AppVeyor.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.PullRequests.Ap Copyright © Cake Issues contributors cake cake-addin cake-issues cake-pullrequestsystem issues pullrequest buildserver appveyor - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.PullRequests.AzureDevOps.nuspec b/nuspec/nuget/Cake.Issues.PullRequests.AzureDevOps.nuspec index 7e9a7ae1a..8ba4fc144 100644 --- a/nuspec/nuget/Cake.Issues.PullRequests.AzureDevOps.nuspec +++ b/nuspec/nuget/Cake.Issues.PullRequests.AzureDevOps.nuspec @@ -27,7 +27,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.PullRequests.Az Copyright © Cake Issues contributors cake cake-addin cake-issues cake-pullrequestsystem issues pullrequest tfs azure-devops azure-devops-server - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.PullRequests.GitHubActions.nuspec b/nuspec/nuget/Cake.Issues.PullRequests.GitHubActions.nuspec index c9dcccf64..88f79c503 100644 --- a/nuspec/nuget/Cake.Issues.PullRequests.GitHubActions.nuspec +++ b/nuspec/nuget/Cake.Issues.PullRequests.GitHubActions.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.PullRequests.Gi Copyright © Cake Issues contributors cake cake-addin cake-issues cake-pullrequestsystem issues pullrequest buildserver github github-actions - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.PullRequests.nuspec b/nuspec/nuget/Cake.Issues.PullRequests.nuspec index 64242bf8f..5aea90ba8 100644 --- a/nuspec/nuget/Cake.Issues.PullRequests.nuspec +++ b/nuspec/nuget/Cake.Issues.PullRequests.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.PullRequests. Copyright © Cake Issues contributors Cake Script Cake-Issues CodeAnalysis Linting Issues Pull-Requests - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.Reporting.Console.nuspec b/nuspec/nuget/Cake.Issues.Reporting.Console.nuspec index 452624d19..38c0ba332 100644 --- a/nuspec/nuget/Cake.Issues.Reporting.Console.nuspec +++ b/nuspec/nuget/Cake.Issues.Reporting.Console.nuspec @@ -28,7 +28,7 @@ The addin requires Cake 1.2.0 or higher. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-reportformat issues reporting console - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.Reporting.Generic.nuspec b/nuspec/nuget/Cake.Issues.Reporting.Generic.nuspec index 269217371..2d165ac6c 100644 --- a/nuspec/nuget/Cake.Issues.Reporting.Generic.nuspec +++ b/nuspec/nuget/Cake.Issues.Reporting.Generic.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.Reporting.Gener Copyright © Cake Issues contributors cake cake-addin cake-issues cake-reportformat issues reporting html markdown razor - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.Reporting.Sarif.nuspec b/nuspec/nuget/Cake.Issues.Reporting.Sarif.nuspec index 56f4a6c7e..fbeabb804 100644 --- a/nuspec/nuget/Cake.Issues.Reporting.Sarif.nuspec +++ b/nuspec/nuget/Cake.Issues.Reporting.Sarif.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.Reporting.Sarif Copyright © Cake Issues contributors cake cake-addin cake-issues cake-reportformat issues reporting sarif - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.Reporting.nuspec b/nuspec/nuget/Cake.Issues.Reporting.nuspec index abdf72099..d23abea95 100644 --- a/nuspec/nuget/Cake.Issues.Reporting.nuspec +++ b/nuspec/nuget/Cake.Issues.Reporting.nuspec @@ -26,7 +26,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.Reporting. Copyright © Cake Issues contributors Cake Script Cake-Issues CodeAnalysis Linting Issues Reporting - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.Sarif.nuspec b/nuspec/nuget/Cake.Issues.Sarif.nuspec index 27a97aa6a..536b150b8 100644 --- a/nuspec/nuget/Cake.Issues.Sarif.nuspec +++ b/nuspec/nuget/Cake.Issues.Sarif.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.Sarif. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider linting sarif - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.Terraform.nuspec b/nuspec/nuget/Cake.Issues.Terraform.nuspec index 22ba1a9bf..959a0c8b3 100644 --- a/nuspec/nuget/Cake.Issues.Terraform.nuspec +++ b/nuspec/nuget/Cake.Issues.Terraform.nuspec @@ -28,7 +28,7 @@ For addin compatible with Cake Frosting see Cake.Frosting.Issues.Terraform. Copyright © Cake Issues contributors cake cake-addin cake-issues cake-issueprovider linting terraform - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.Testing.nuspec b/nuspec/nuget/Cake.Issues.Testing.nuspec index bb7ae992d..b37789721 100644 --- a/nuspec/nuget/Cake.Issues.Testing.nuspec +++ b/nuspec/nuget/Cake.Issues.Testing.nuspec @@ -17,7 +17,7 @@ Common helpers for testing add-ins based on Cake.Issues Copyright © Cake Issues contributors Cake Script Cake-Issues Issues Testing - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/nuspec/nuget/Cake.Issues.nuspec b/nuspec/nuget/Cake.Issues.nuspec index 39c136a57..cd666369e 100644 --- a/nuspec/nuget/Cake.Issues.nuspec +++ b/nuspec/nuget/Cake.Issues.nuspec @@ -24,7 +24,7 @@ See the Project Site for an overview of the whole ecosystem of addins for workin Copyright © Cake Issues contributors cake cake-addin cake-issues code-analysis linting issues - https://github.com/cake-contrib/Cake.Issues/releases/tag/4.2.1 + https://github.com/cake-contrib/Cake.Issues/releases/tag/4.3.0 diff --git a/src/Cake.Issues.MsBuild/Cake.Issues.MsBuild.csproj b/src/Cake.Issues.MsBuild/Cake.Issues.MsBuild.csproj index e737d8374..e9a6c102c 100644 --- a/src/Cake.Issues.MsBuild/Cake.Issues.MsBuild.csproj +++ b/src/Cake.Issues.MsBuild/Cake.Issues.MsBuild.csproj @@ -23,7 +23,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/Cake.Issues.MsBuild/LogFileFormat/BinaryLogFileFormat.cs b/src/Cake.Issues.MsBuild/LogFileFormat/BinaryLogFileFormat.cs index d14512be3..cb485d9bc 100644 --- a/src/Cake.Issues.MsBuild/LogFileFormat/BinaryLogFileFormat.cs +++ b/src/Cake.Issues.MsBuild/LogFileFormat/BinaryLogFileFormat.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; + using System.Runtime.InteropServices; using Cake.Core.Diagnostics; using Microsoft.Build.Framework; using Microsoft.Build.Logging.StructuredLogger; @@ -23,6 +24,13 @@ public override IEnumerable ReadIssues( repositorySettings.NotNull(nameof(repositorySettings)); issueProviderSettings.NotNull(nameof(issueProviderSettings)); + // Ensure that strings for MsBuild.StructuredLogger are initialized. + // See https://github.com/KirillOsenkov/MSBuildStructuredLog/issues/736 + if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) + { + Strings.Initialize(); + } + var result = new List(); var binLogReader = new BinLogReader(); diff --git a/tests/Cake.Issues.MsBuild/script-runner/.config/dotnet-tools.json b/tests/Cake.Issues.MsBuild/script-runner/.config/dotnet-tools.json new file mode 100644 index 000000000..da200cdae --- /dev/null +++ b/tests/Cake.Issues.MsBuild/script-runner/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "cake.tool": { + "version": "4.0.0", + "commands": [ + "dotnet-cake" + ] + } + } +} \ No newline at end of file diff --git a/tests/Cake.Issues.MsBuild/script-runner/.gitignore b/tests/Cake.Issues.MsBuild/script-runner/.gitignore new file mode 100644 index 000000000..e7c496290 --- /dev/null +++ b/tests/Cake.Issues.MsBuild/script-runner/.gitignore @@ -0,0 +1,379 @@ + +# Created by https://www.gitignore.io/api/cake,windows,visualstudio,visualstudiocode + +### Cake ### +tools/* +!tools/packages.config + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### VisualStudio ### +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + + +# End of https://www.gitignore.io/api/cake,windows,visualstudio,visualstudiocode + + +# Project specific folders +BuildArtifacts diff --git a/tests/Cake.Issues.MsBuild/script-runner/build.cake b/tests/Cake.Issues.MsBuild/script-runner/build.cake new file mode 100644 index 000000000..2a33e6916 --- /dev/null +++ b/tests/Cake.Issues.MsBuild/script-runner/build.cake @@ -0,0 +1,72 @@ +#load "buildData.cake" + +#addin "Cake.Issues&prerelease" +#addin "Cake.Issues.MsBuild&prerelease" + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +////////////////////////////////////////////////// +// SETUP / TEARDOWN +////////////////////////////////////////////////// + +Setup(setupContext => +{ + return new BuildData(); +}); + +var repoRootFolder = MakeAbsolute(Directory("./")); +var logPath = repoRootFolder.Combine("BuildArtifacts").Combine("logs"); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Build") + .Does((data) => +{ + var msBuildLogPath = logPath.CombineWithFilePath("msbuild.binlog"); + var solutionFile = + repoRootFolder + .Combine("src") + .CombineWithFilePath("ClassLibrary1.sln"); + + DotNetRestore(solutionFile.FullPath); + + var settings = + new DotNetMSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + "BinaryLogger," + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll"), + "", + msBuildLogPath.FullPath + ); + + DotNetBuild( + solutionFile.FullPath, + new DotNetBuildSettings + { + MSBuildSettings = settings + }); + + data.AddIssues( + ReadIssues( + MsBuildIssuesFromFilePath( + msBuildLogPath, + MsBuildBinaryLogFileFormat), + repoRootFolder) + ); +}); + +// Run Build task by default. +Task("Default") + .IsDependentOn("Build"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file diff --git a/tests/Cake.Issues.MsBuild/script-runner/build.ps1 b/tests/Cake.Issues.MsBuild/script-runner/build.ps1 new file mode 100644 index 000000000..fe6027689 --- /dev/null +++ b/tests/Cake.Issues.MsBuild/script-runner/build.ps1 @@ -0,0 +1,15 @@ +$ErrorActionPreference = 'Stop' + +$SCRIPT_NAME = "build.cake" + +Write-Host "Restoring .NET Core tools" +dotnet tool restore +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + +Write-Host "Bootstrapping Cake" +dotnet cake $SCRIPT_NAME --bootstrap +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + +Write-Host "Running Build" +dotnet cake $SCRIPT_NAME @args +if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } \ No newline at end of file diff --git a/tests/Cake.Issues.MsBuild/script-runner/build.sh b/tests/Cake.Issues.MsBuild/script-runner/build.sh new file mode 100755 index 000000000..921a3241b --- /dev/null +++ b/tests/Cake.Issues.MsBuild/script-runner/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash +SCRIPT_NAME="build.cake" + +echo "Restoring .NET Core tools" +dotnet tool restore + +echo "Bootstrapping Cake" +dotnet cake $SCRIPT_NAME --bootstrap + +echo "Running Build" +dotnet cake $SCRIPT_NAME "$@" \ No newline at end of file diff --git a/tests/Cake.Issues.MsBuild/script-runner/buildData.cake b/tests/Cake.Issues.MsBuild/script-runner/buildData.cake new file mode 100644 index 000000000..8a22d4145 --- /dev/null +++ b/tests/Cake.Issues.MsBuild/script-runner/buildData.cake @@ -0,0 +1,29 @@ +public class BuildData +{ + private readonly List issues = new List(); + + /// + /// Gets issues determined during building. + /// + public IEnumerable Issues + { + get + { + return issues.AsReadOnly(); + } + } + + /// + /// Add issues to . + /// + /// List of issues which should be added. + public void AddIssues(IEnumerable issues) + { + if (issues == null) + { + throw new NullReferenceException(nameof(issues)); + } + + this.issues.AddRange(issues); + } +} \ No newline at end of file diff --git a/tests/Cake.Issues.MsBuild/script-runner/nuget.config b/tests/Cake.Issues.MsBuild/script-runner/nuget.config new file mode 100644 index 000000000..62768c3d3 --- /dev/null +++ b/tests/Cake.Issues.MsBuild/script-runner/nuget.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/tests/Cake.Issues.MsBuild/script-runner/src/ClassLibrary1.sln b/tests/Cake.Issues.MsBuild/script-runner/src/ClassLibrary1.sln new file mode 100644 index 000000000..62df92e3d --- /dev/null +++ b/tests/Cake.Issues.MsBuild/script-runner/src/ClassLibrary1.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassLibrary1", "ClassLibrary1\ClassLibrary1.csproj", "{9B73BB5B-06A3-46F3-9068-E3607A8217B0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9B73BB5B-06A3-46F3-9068-E3607A8217B0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tests/Cake.Issues.MsBuild/script-runner/src/ClassLibrary1/Class1.cs b/tests/Cake.Issues.MsBuild/script-runner/src/ClassLibrary1/Class1.cs new file mode 100644 index 000000000..4ea00049a --- /dev/null +++ b/tests/Cake.Issues.MsBuild/script-runner/src/ClassLibrary1/Class1.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ClassLibrary1 +{ + public class Class1 + { + public void Foo() + { + var foo = "foo"; + var bar = "bar"; + if (!string.IsNullOrEmpty(foo) && !string.IsNullOrEmpty(bar)) + { + var foobar = foo + bar; + } + } + + public void Bar() + { + var foo = "foo"; + var bar = "bar"; + if (!string.IsNullOrEmpty(foo) && !string.IsNullOrEmpty(bar)) + { + var foobar = foo + bar; + } + } + } +} diff --git a/tests/Cake.Issues.MsBuild/script-runner/src/ClassLibrary1/ClassLibrary1.csproj b/tests/Cake.Issues.MsBuild/script-runner/src/ClassLibrary1/ClassLibrary1.csproj new file mode 100644 index 000000000..9ec4dd90e --- /dev/null +++ b/tests/Cake.Issues.MsBuild/script-runner/src/ClassLibrary1/ClassLibrary1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + + + + + all + 3.0.0 + + + all + 1.1.118 + + + + + + + \ No newline at end of file