diff --git a/.appveyor.yml b/.appveyor.yml index 54cab0fe..00b75590 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -12,7 +12,7 @@ install: - ps: Invoke-WebRequest -Uri "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 5.0.408 -InstallDir $env:DOTNET_INSTALL_DIR' - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 8.0.404 -InstallDir $env:DOTNET_INSTALL_DIR' - - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 9.0.100 -InstallDir $env:DOTNET_INSTALL_DIR' + - ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 9.0.101 -InstallDir $env:DOTNET_INSTALL_DIR' - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" - ps: dotnet --info - ps: Install-Product node 20 @@ -23,7 +23,7 @@ build_script: # Tests test_script: - - ps: cd .\tests\script-runner\ + - ps: cd .\tests\script-runner\net8.0-git-cli\ - ps: .\build.ps1 --verbosity=diagnostic #---------------------------------# diff --git a/.azuredevops/pipelines/templates/jobs/test-frosting.yml b/.azuredevops/pipelines/templates/jobs/test-frosting.yml new file mode 100644 index 00000000..809b9178 --- /dev/null +++ b/.azuredevops/pipelines/templates/jobs/test-frosting.yml @@ -0,0 +1,28 @@ +parameters: + - name: images + type: object + - name: dotNetVersions + type: object + - name: repositoryInfoProviders + type: object + +jobs: + - ${{ each image in parameters.images }}: + - ${{ each dotnetVersion in parameters.dotNetVersions }}: + - ${{ each repositoryInfoProvider in parameters.repositoryInfoProviders }}: + - job: Test_Frosting_${{ replace(replace(image,'-','_'),'.','_') }}_Net${{ dotNetVersion }}_${{ replace(repositoryInfoProvider,'-','_') }} + displayName: Integration Tests Frosting ${{ image }} (.NET ${{ dotNetVersion }} / ${{ repositoryInfoProvider }}) + dependsOn: Build + pool: + vmImage: '${{ image }}' + steps: + - template: ../steps/prepare-test.yml + parameters: + dotNetVersion: ${{ dotNetVersion }} + - bash: | + ./build.sh --verbosity=diagnostic + workingDirectory: ./tests/frosting/net${{ dotNetVersion }}.0-${{ repositoryInfoProvider }} + displayName: 'Run integration tests' + - publish: $(Build.SourcesDirectory)/tests/frosting/net${{ dotNetVersion }}.0-${{ repositoryInfoProvider }}/build/BuildArtifacts/output + artifact: Integration Tests Frosting ${{ image }} (.NET ${{ dotNetVersion }} + ${{ repositoryInfoProvider }}) + displayName: 'Publish generated reports as build artifact' diff --git a/.azuredevops/pipelines/templates/jobs/test-scripting.yml b/.azuredevops/pipelines/templates/jobs/test-scripting.yml new file mode 100644 index 00000000..2bde7e13 --- /dev/null +++ b/.azuredevops/pipelines/templates/jobs/test-scripting.yml @@ -0,0 +1,28 @@ +parameters: + - name: images + type: object + - name: dotNetVersions + type: object + - name: repositoryInfoProviders + type: object + +jobs: + - ${{ each image in parameters.images }}: + - ${{ each dotnetVersion in parameters.dotNetVersions }}: + - ${{ each repositoryInfoProvider in parameters.repositoryInfoProviders }}: + - job: Test_Script_Runner_${{ replace(replace(image,'-','_'),'.','_') }}_Net${{ dotNetVersion }}_${{ replace(repositoryInfoProvider,'-','_') }} + displayName: Integration Tests Script Runner ${{ image }} (.NET ${{ dotNetVersion }} / ${{ repositoryInfoProvider }}) + dependsOn: Build + pool: + vmImage: '${{ image }}' + steps: + - template: ../steps/prepare-test.yml + parameters: + dotNetVersion: ${{ dotNetVersion }} + - bash: | + ./build.sh --verbosity=diagnostic + workingDirectory: ./tests/script-runner/net${{ dotNetVersion }}.0-${{ repositoryInfoProvider }} + displayName: 'Run integration tests' + - publish: $(Build.SourcesDirectory)/tests/script-runner/net${{ dotNetVersion }}.0-${{ repositoryInfoProvider }}/BuildArtifacts/output + artifact: Integration Tests Script Runner ${{ image }} (.NET ${{ dotNetVersion }} + ${{ repositoryInfoProvider }}) + displayName: 'Publish generated reports as build artifact' diff --git a/.azuredevops/pipelines/templates/steps/prepare-test.yml b/.azuredevops/pipelines/templates/steps/prepare-test.yml new file mode 100644 index 00000000..0d6e8b10 --- /dev/null +++ b/.azuredevops/pipelines/templates/steps/prepare-test.yml @@ -0,0 +1,24 @@ +parameters: +- name: dotNetVersion + type: string + +steps: + - task: UseDotNet@2 + inputs: + version: '${{ parameters.dotNetVersion }}.x' + displayName: 'Install .NET ${{ parameters.dotNetVersion }}' + - task: NodeTool@0 + inputs: + versionSpec: '20.x' + displayName: 'Install NodeJs 20.x' + - script: | + npm install -g markdownlint-cli + displayName: 'Install required tools' + - download: current + artifact: NuGet Package + displayName: 'Download build artifact' + - task: CopyFiles@2 + inputs: + sourceFolder: $(Pipeline.Workspace)/NuGet Package + targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet + displayName: 'Copy build artifact for test run' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a98775aa..f6761c53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,11 +22,11 @@ jobs: run: .\build.ps1 shell: powershell - name: Publish NuGet package as build artifact - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4 with: name: NuGet Package path: ./BuildArtifacts/Packages/NuGet/ - # Integration Tests Script Runner Windows (.NET tool) + # Integration Tests Script Runner Windows 2019 (.NET 8) Test_Windows_DotNetTool: name: Integration Tests Script Runner Windows (.NET tool) needs: Build @@ -49,10 +49,10 @@ jobs: 8.x - name: Run integration tests run: ./build.ps1 --verbosity=diagnostic - working-directory: ./tests/script-runner/ + working-directory: ./tests/script-runner/net8.0-git-cli/ shell: powershell - name: Publish generated reports as build artifact - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4 + uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4 with: name: Integration Tests Script Runner Windows (.NET tool) - path: ./tests/script-runner/BuildArtifacts/output/ + path: ./tests/script-runner/net8.0/BuildArtifacts/output/ diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.Tests/Cake.Frosting.Issues.Recipe.Tests.csproj b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.Tests/Cake.Frosting.Issues.Recipe.Tests.csproj index 5cdb9793..cc19955d 100644 --- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.Tests/Cake.Frosting.Issues.Recipe.Tests.csproj +++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.Tests/Cake.Frosting.Issues.Recipe.Tests.csproj @@ -18,7 +18,7 @@ - + @@ -27,7 +27,7 @@ - + runtime; build; native; contentfiles; analyzers all diff --git a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj index f2ae7498..f1cfdd89 100644 --- a/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj +++ b/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe/Cake.Frosting.Issues.Recipe.csproj @@ -25,7 +25,7 @@ For recipe compatible with Cake Script Runners see Cake.Issues.Recipe.MIT git https://github.com/cake-contrib/Cake.Issues.Recipe.git - https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/5.0.0-beta.1 + https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/5.0.1 @@ -41,21 +41,21 @@ For recipe compatible with Cake Script Runners see Cake.Issues.Recipe. - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/Cake.Frosting.Issues.Recipe/global.json b/Cake.Frosting.Issues.Recipe/global.json index 5110c037..913686c4 100644 --- a/Cake.Frosting.Issues.Recipe/global.json +++ b/Cake.Frosting.Issues.Recipe/global.json @@ -1,7 +1,7 @@ { "sdk": { "allowPrerelease": true, - "version": "9.0.100", + "version": "9.0.101", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/Cake.Issues.Recipe/Content/addins.cake b/Cake.Issues.Recipe/Content/addins.cake index a6e85018..5771f88b 100644 --- a/Cake.Issues.Recipe/Content/addins.cake +++ b/Cake.Issues.Recipe/Content/addins.cake @@ -2,19 +2,19 @@ // ADDINS /////////////////////////////////////////////////////////////////////////////// -#addin nuget:?package=Cake.Git&version=5.0.0 -#addin nuget:?package=Cake.Issues&version=5.0.0 -#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.0 -#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.0 -#addin nuget:?package=Cake.Issues.Markdownlint&version=5.0.0 -#addin nuget:?package=Cake.Issues.EsLint&version=5.0.0 -#addin nuget:?package=Cake.Issues.Sarif&version=5.0.0 -#addin nuget:?package=Cake.Issues.Reporting&version=5.0.0 -#addin nuget:?package=Cake.Issues.Reporting.Generic&version=5.0.0 -#addin nuget:?package=Cake.Issues.Reporting.Sarif&version=5.0.0 -#addin nuget:?package=Cake.Issues.Reporting.Console&version=5.0.0 -#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.0 -#addin nuget:?package=Cake.Issues.PullRequests.AppVeyor&version=5.0.0 -#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.0 -#addin nuget:?package=Cake.Issues.PullRequests.GitHubActions&version=5.0.0 +#addin nuget:?package=Cake.Git&version=5.0.1 +#addin nuget:?package=Cake.Issues&version=5.0.1 +#addin nuget:?package=Cake.Issues.MsBuild&version=5.0.1 +#addin nuget:?package=Cake.Issues.InspectCode&version=5.0.1 +#addin nuget:?package=Cake.Issues.Markdownlint&version=5.0.1 +#addin nuget:?package=Cake.Issues.EsLint&version=5.0.1 +#addin nuget:?package=Cake.Issues.Sarif&version=5.0.1 +#addin nuget:?package=Cake.Issues.Reporting&version=5.0.1 +#addin nuget:?package=Cake.Issues.Reporting.Generic&version=5.0.1 +#addin nuget:?package=Cake.Issues.Reporting.Sarif&version=5.0.1 +#addin nuget:?package=Cake.Issues.Reporting.Console&version=5.0.1 +#addin nuget:?package=Cake.Issues.PullRequests&version=5.0.1 +#addin nuget:?package=Cake.Issues.PullRequests.AppVeyor&version=5.0.1 +#addin nuget:?package=Cake.Issues.PullRequests.AzureDevOps&version=5.0.1 +#addin nuget:?package=Cake.Issues.PullRequests.GitHubActions&version=5.0.1 #addin nuget:?package=Cake.AzureDevOps&version=5.0.0 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ed6d794d..f53b0d1a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,391 +33,15 @@ jobs: - publish: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet artifact: NuGet Package displayName: 'Publish NuGet package as build artifact' -# Integration Tests Frosting Windows (.NET 8) -- job: Test_Frosting_Windows_2019_Net8 - displayName: Integration Tests Frosting Windows 2019 (.NET 8) - dependsOn: Build - pool: - vmImage: 'windows-2019' - steps: - - task: UseDotNet@2 - inputs: - version: '8.x' - displayName: 'Install .NET 8' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - powershell: choco install markdownlint-cli --no-progress - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - powershell: ./build.ps1 --verbosity=diagnostic - workingDirectory: ./tests/frosting/net8.0 - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/frosting/net8.0/build/BuildArtifacts/output - artifact: Integration Tests Frosting Windows 2019 (.NET 8) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Frosting Windows (.NET 9) -- job: Test_Frosting_Windows_2022_Net9 - displayName: Integration Tests Frosting Windows 2022 (.NET 9) - dependsOn: Build - pool: - vmImage: 'windows-2022' - steps: - - task: UseDotNet@2 - inputs: - version: '9.x' - displayName: 'Install .NET 9' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - powershell: choco install markdownlint-cli --no-progress - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - powershell: ./build.ps1 --verbosity=diagnostic - workingDirectory: ./tests/frosting/net9.0 - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/frosting/net9.0/build/BuildArtifacts/output - artifact: Integration Tests Frosting Windows 2022 (.NET 9) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Script Runner Windows 2019 (.NET tool) -- job: Test_Script_Runner_Windows_2019_DotNetTool - displayName: Integration Tests Script Runner Windows 2019 (.NET tool) - dependsOn: Build - pool: - vmImage: 'windows-2019' - steps: - - task: UseDotNet@2 - inputs: - version: '8.x' - displayName: 'Install .NET 8' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - powershell: choco install markdownlint-cli --no-progress - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - powershell: ./build.ps1 --verbosity=diagnostic - workingDirectory: ./tests/script-runner/ - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/script-runner/BuildArtifacts/output - artifact: Integration Tests Script Runner Windows 2019 (.NET tool) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Script Runner Windows 2022 (.NET tool) -- job: Test_Script_Runner_Windows_2022_DotNetTool - displayName: Integration Tests Script Runner Windows 2022 (.NET tool) - dependsOn: Build - pool: - vmImage: 'windows-2022' - steps: - - task: UseDotNet@2 - inputs: - version: '8.x' - displayName: 'Install .NET 8' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - powershell: choco install markdownlint-cli --no-progress - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - powershell: ./build.ps1 --verbosity=diagnostic - workingDirectory: ./tests/script-runner/ - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/script-runner/BuildArtifacts/output - artifact: Integration Tests Script Runner Windows 2022 (.NET tool) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Frosting macOS 13 (.NET 8) -- job: Test_Frosting_macOS_13_Net8 - displayName: Integration Tests Frosting macOS 13 (.NET 8) - dependsOn: Build - pool: - vmImage: 'macOS-13' - steps: - - task: UseDotNet@2 - inputs: - version: '8.x' - displayName: 'Install .NET 8' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - bash: | - npm install -g markdownlint-cli - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - bash: | - ./build.sh --verbosity=diagnostic - workingDirectory: ./tests/frosting/net8.0 - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/frosting/net8.0/build/BuildArtifacts/output - artifact: Integration Tests Frosting macOS 13 (.NET 8) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Frosting macOS 14 (.NET 9) -- job: Test_Frosting_macOS_14_Net9 - displayName: Integration Tests Frosting macOS 14 (.NET 9) - dependsOn: Build - pool: - vmImage: 'macOS-14' - steps: - - task: UseDotNet@2 - inputs: - version: '9.x' - displayName: 'Install .NET 9' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - bash: | - npm install -g markdownlint-cli - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - bash: | - ./build.sh --verbosity=diagnostic - workingDirectory: ./tests/frosting/net9.0 - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/frosting/net9.0/build/BuildArtifacts/output - artifact: Integration Tests Frosting macOS 14 (.NET 9) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Script Runner macOS 13 (.NET tool) -- job: Test_Script_Runner_macOS_13_DotNetTool - displayName: Integration Tests Script Runner macOS 13 (.NET tool) - dependsOn: Build - pool: - vmImage: 'macOS-13' - steps: - - task: UseDotNet@2 - inputs: - version: '8.x' - displayName: 'Install .NET 8' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - bash: | - npm install -g markdownlint-cli - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - bash: | - ./build.sh --verbosity=diagnostic - workingDirectory: ./tests/script-runner/ - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/script-runner/BuildArtifacts/output - artifact: Integration Tests Script Runner macOS 13 (.NET tool) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Script Runner macOS 14 (.NET tool) -- job: Test_Script_Runner_macOS_14_DotNetTool - displayName: Integration Tests Script Runner macOS 14 (.NET tool) - dependsOn: Build - pool: - vmImage: 'macOS-14' - steps: - - task: UseDotNet@2 - inputs: - version: '8.x' - displayName: 'Install .NET 8' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - bash: | - npm install -g markdownlint-cli - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - bash: | - ./build.sh --verbosity=diagnostic - workingDirectory: ./tests/script-runner/ - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/script-runner/BuildArtifacts/output - artifact: Integration Tests Script Runner macOS 14 (.NET tool) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Frosting Ubuntu 22.04 (.NET 8) -- job: Test_Frosting_ubuntu_2204_Net8 - displayName: Integration Tests Frosting Ubuntu 22.04 (.NET 8) - dependsOn: Build - pool: - vmImage: 'ubuntu-22.04' - steps: - - task: UseDotNet@2 - inputs: - version: '8.x' - displayName: 'Install .NET 8' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - bash: | - npm install -g markdownlint-cli - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - bash: | - ./build.sh --verbosity=diagnostic - workingDirectory: ./tests/frosting/net8.0 - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/frosting/net8.0/build/BuildArtifacts/output - artifact: Integration Tests Frosting Ubuntu 22.04 (.NET 8) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Frosting Ubuntu 24.04 (.NET 9) -- job: Test_Frosting_ubuntu_2404_Net9 - displayName: Integration Tests Frosting Ubuntu 24.04 (.NET 9) - dependsOn: Build - pool: - vmImage: 'ubuntu-24.04' - steps: - - task: UseDotNet@2 - inputs: - version: '9.x' - displayName: 'Install .NET 9' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - bash: | - npm install -g markdownlint-cli - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - bash: | - ./build.sh --verbosity=diagnostic - workingDirectory: ./tests/frosting/net9.0 - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/frosting/net9.0/build/BuildArtifacts/output - artifact: Integration Tests Frosting Ubuntu 24.04 (.NET 9) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Script Runner Ubuntu 22.04 (.NET tool) -- job: Test_Script_Runner_ubuntu_2204_DotNetTool - displayName: Integration Tests Script Runner Ubuntu 22.04 (.NET tool) - dependsOn: Build - pool: - vmImage: 'ubuntu-22.04' - steps: - - task: UseDotNet@2 - inputs: - version: '8.x' - displayName: 'Install .NET 8' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - bash: | - npm install -g markdownlint-cli - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - bash: | - ./build.sh --verbosity=diagnostic - workingDirectory: ./tests/script-runner/ - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/script-runner/BuildArtifacts/output - artifact: Integration Tests Script Runner Ubuntu 22.04 (.NET tool) - displayName: 'Publish generated reports as build artifact' -# Integration Tests Script Runner Ubuntu 24.04 (.NET tool) -- job: Test_Script_Runner_ubuntu_2404_DotNetTool - displayName: Integration Tests Script Runner Ubuntu 24.04 (.NET tool) - dependsOn: Build - pool: - vmImage: 'ubuntu-24.04' - steps: - - task: UseDotNet@2 - inputs: - version: '8.x' - displayName: 'Install .NET 8' - - task: NodeTool@0 - inputs: - versionSpec: '20.x' - displayName: 'Install NodeJs 20.x' - - bash: | - npm install -g markdownlint-cli - displayName: 'Install required tools' - - download: current - artifact: NuGet Package - displayName: 'Download build artifact' - - task: CopyFiles@2 - inputs: - sourceFolder: $(Pipeline.Workspace)/NuGet Package - targetFolder: $(Build.SourcesDirectory)/BuildArtifacts/Packages/NuGet - displayName: 'Copy build artifact for test run' - - bash: | - ./build.sh --verbosity=diagnostic - workingDirectory: ./tests/script-runner/ - displayName: 'Run integration tests' - - publish: $(Build.SourcesDirectory)/tests/script-runner/BuildArtifacts/output - artifact: Integration Tests Script Runner Ubuntu 24.04 (.NET tool) - displayName: 'Publish generated reports as build artifact' +# Integration Tests Frosting +- template: .azuredevops/pipelines/templates/jobs/test-frosting.yml + parameters: + images: [ 'windows-2019', 'windows-2022', 'macOS-13', 'macOS-14', 'ubuntu-22.04', 'ubuntu-24.04' ] + dotNetVersions: [ 8, 9 ] + repositoryInfoProviders: [ 'git-cli', 'cake-git' ] +# Integration Tests Script Runner +- template: .azuredevops/pipelines/templates/jobs/test-scripting.yml + parameters: + images: [ 'windows-2019', 'windows-2022', 'macOS-13', 'macOS-14', 'ubuntu-22.04', 'ubuntu-24.04' ] + dotNetVersions: [ 8, 9 ] + repositoryInfoProviders: [ 'git-cli', 'cake-git' ] \ No newline at end of file diff --git a/docs/overview.md b/docs/overview.md index 252fc1f9..b7b44b21 100644 --- a/docs/overview.md +++ b/docs/overview.md @@ -24,20 +24,20 @@ Cake.Issues recipes will add the following addins to your build: | Addin Cake.Issues.Recipe | Addin.Frosting.Issues.Recipe | Remarks | |---------------------------------------------------------|------------------------------------------------------------------|-| -| [Cake.Git] 5.0.0 | [Cake.Frosting.Git] 5.0.0 | Only used if `RepositoryInfoProvider` type is set to `RepositoryInfoProviderType.CakeGit`. See [Git repository information configuration] for details. | -| [Cake.Issues] 5.0.0 | [Cake.Issues] 5.0.0 | | -| [Cake.Issues.MsBuild] 5.0.0 | [Cake.Frosting.Issues.MsBuild] 5.0.0 | | -| [Cake.Issues.InspectCode] 5.0.0 | [Cake.Frosting.Issues.InspectCode] 5.0.0 | | -| [Cake.Issues.Markdownlint] 5.0.0 | [Cake.Frosting.Issues.Markdownlint] 5.0.0 | | -| [Cake.Issues.EsLint] 5.0.0 | [Cake.Frosting.Issues.EsLint] 5.0.0 | | -| [Cake.Issues.Sarif] 5.0.0 | [Cake.Frosting.Issues.Sarif] 5.0.0 | | -| [Cake.Issues.Reporting] 5.0.0 | [Cake.Frosting.Issues.Reporting] 5.0.0 | | -| [Cake.Issues.Reporting.Generic] 5.0.0 | [Cake.Frosting.Issues.Reporting.Generic] 5.0.0 | | -| [Cake.Issues.Reporting.Sarif] 5.0.0 | [Cake.Frosting.Issues.Reporting.Sarif] 5.0.0 | | -| [Cake.Issues.PullRequests] 5.0.0 | [Cake.Frosting.Issues.PullRequests] 5.0.0 | | -| [Cake.Issues.PullRequests.AppVeyor] 5.0.0 | [Cake.Frosting.Issues.PullRequests.AppVeyor] 5.0.0 | | -| [Cake.Issues.PullRequests.AzureDevOps] 5.0.0 | [Cake.Frosting.Issues.PullRequests.AzureDevOps] 5.0.0 | | -| [Cake.Issues.PullRequests.GitHubActions] 5.0. | [Cake.Frosting.Issues.PullRequests.GitHubActions] 5.0.0 | | +| [Cake.Git] 5.0.1 | [Cake.Frosting.Git] 5.0.1 | Only used if `RepositoryInfoProvider` type is set to `RepositoryInfoProviderType.CakeGit`. See [Git repository information configuration] for details. | +| [Cake.Issues] 5.0.1 | [Cake.Issues] 5.0.1 | | +| [Cake.Issues.MsBuild] 5.0.1 | [Cake.Frosting.Issues.MsBuild] 5.0.1 | | +| [Cake.Issues.InspectCode] 5.0.1 | [Cake.Frosting.Issues.InspectCode] 5.0.1 | | +| [Cake.Issues.Markdownlint] 5.0.1 | [Cake.Frosting.Issues.Markdownlint] 5.0.1 | | +| [Cake.Issues.EsLint] 5.0.1 | [Cake.Frosting.Issues.EsLint] 5.0.1 | | +| [Cake.Issues.Sarif] 5.0.1 | [Cake.Frosting.Issues.Sarif] 5.0.1 | | +| [Cake.Issues.Reporting] 5.0.1 | [Cake.Frosting.Issues.Reporting] 5.0.1 | | +| [Cake.Issues.Reporting.Generic] 5.0.1 | [Cake.Frosting.Issues.Reporting.Generic] 5.0.1 | | +| [Cake.Issues.Reporting.Sarif] 5.0.1 | [Cake.Frosting.Issues.Reporting.Sarif] 5.0.1 | | +| [Cake.Issues.PullRequests] 5.0.1 | [Cake.Frosting.Issues.PullRequests] 5.0.1 | | +| [Cake.Issues.PullRequests.AppVeyor] 5.0.1 | [Cake.Frosting.Issues.PullRequests.AppVeyor] 5.0.1 | | +| [Cake.Issues.PullRequests.AzureDevOps] 5.0.1 | [Cake.Frosting.Issues.PullRequests.AzureDevOps] 5.0.1 | | +| [Cake.Issues.PullRequests.GitHubActions] 5.0.1 | [Cake.Frosting.Issues.PullRequests.GitHubActions] 5.0.1 | | | [Cake.AzureDevOps] 5.0.0 | [Cake.AzureDevOps] 5.0.0 | | [Cake.Issues.Recipe]: https://www.nuget.org/packages/Cake.Issues.Recipe diff --git a/nuspec/nuget/Cake.Issues.Recipe.nuspec b/nuspec/nuget/Cake.Issues.Recipe.nuspec index 24b86fd5..99d46851 100644 --- a/nuspec/nuget/Cake.Issues.Recipe.nuspec +++ b/nuspec/nuget/Cake.Issues.Recipe.nuspec @@ -23,7 +23,7 @@ For recipe compatible with Cake Frosting see Cake.Frosting.Issues.Recipe. Copyright © Pascal Berger cake cake-recipe cake-issues - https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/5.0.0-beta.1 + https://github.com/cake-contrib/Cake.Issues.Recipe/releases/tag/5.0.1 diff --git a/tests/frosting/net8.0/build.ps1 b/tests/frosting/net8.0-cake-git/build.ps1 similarity index 100% rename from tests/frosting/net8.0/build.ps1 rename to tests/frosting/net8.0-cake-git/build.ps1 diff --git a/tests/frosting/net8.0/build.sh b/tests/frosting/net8.0-cake-git/build.sh similarity index 100% rename from tests/frosting/net8.0/build.sh rename to tests/frosting/net8.0-cake-git/build.sh diff --git a/tests/frosting/net8.0/build/.gitignore b/tests/frosting/net8.0-cake-git/build/.gitignore similarity index 100% rename from tests/frosting/net8.0/build/.gitignore rename to tests/frosting/net8.0-cake-git/build/.gitignore diff --git a/tests/frosting/net8.0/build/Build.csproj b/tests/frosting/net8.0-cake-git/build/Build.csproj similarity index 100% rename from tests/frosting/net8.0/build/Build.csproj rename to tests/frosting/net8.0-cake-git/build/Build.csproj diff --git a/tests/frosting/net8.0-cake-git/build/Program.cs b/tests/frosting/net8.0-cake-git/build/Program.cs new file mode 100644 index 00000000..221b4caf --- /dev/null +++ b/tests/frosting/net8.0-cake-git/build/Program.cs @@ -0,0 +1,124 @@ +using System; +using System.Reflection; +using Cake.Common; +using Cake.Common.Diagnostics; +using Cake.Common.Tools.InspectCode; +using Cake.Core; +using Cake.Core.Diagnostics; +using Cake.Core.IO; +using Cake.Frosting; + +public static class Program +{ + public static int Main(string[] args) + { + return new CakeHost() + .UseContext() + .UseLifetime() + .InstallTool(new Uri("nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2023.3.4")) + // Register Cake.Frosting.Issues.Recipe tasks. + .AddAssembly(Assembly.GetAssembly(typeof(IssuesTask))) + .Run(args); + } +} + +public class BuildContext : IssuesContext +{ + public BuildContext(ICakeContext context) + : base(context) + { + } + + protected override BuildParameters CreateIssuesParameters() + { + return new BuildParameters(); + } + + protected override BuildState CreateIssuesState() + { + return new BuildState(this); + } +} + +public class BuildParameters : IssuesParameters +{ + public DirectoryPath LogDirectoryPath => this.OutputDirectory.Combine("logs"); + + public BuildParameters() + { + this.OutputDirectory = this.OutputDirectory.Combine("output"); + } +} + +public class BuildState : IssuesState +{ + public FilePath SolutionFilePath { get; } + + public BuildState(BuildContext context) + : base(context, RepositoryInfoProviderType.CakeGit) + { + this.SolutionFilePath = + this.ProjectRootDirectory + .Combine("src") + .CombineWithFilePath("ClassLibrary1.sln"); + } +} + +public class Lifetime : FrostingLifetime +{ + public override void Setup(BuildContext context, ISetupContext info) + { + // Determine Build Identifier + var platform = context.Environment.Platform.Family.ToString(); + var runtime = context.Environment.Runtime.IsCoreClr ? ".NET Core" : ".NET Framework"; + + context.Parameters.BuildIdentifier = $"Cake Frosting {platform} ({runtime})"; + + context.Information("Build identifier: {0}", context.Parameters.BuildIdentifier); + } + + public override void Teardown(BuildContext context, ITeardownContext info) + { + } +} + +[TaskName("Run-InspectCode")] +public sealed class RunInspectCodeTask : FrostingTask +{ + public override bool ShouldRun(BuildContext context) + { + return context.IsRunningOnWindows(); + } + + public override void Run(BuildContext context) + { + // Run InspectCode. + var inspectCodeLogFilePath = context.Parameters.LogDirectoryPath.CombineWithFilePath("inspectCode.log"); + + var settings = new InspectCodeSettings() { + OutputFile = inspectCodeLogFilePath, + ArgumentCustomization = x => x.Append("--no-build"), + WorkingDirectory = context.State.ProjectRootDirectory + }; + + context.InspectCode( + context.State.SolutionFilePath, + settings); + + // Pass path to InspectCode log file to Cake.Frosting.Issues.Recipe. + context.Parameters.InputFiles.AddInspectCodeLogFilePath(inspectCodeLogFilePath); + } +} + +[TaskName("Lint")] +[IsDependentOn(typeof(RunInspectCodeTask))] +[IsDependeeOf(typeof(ReadIssuesTask))] +public class LintTask : FrostingTask +{ +} + +[TaskName("Default")] +[IsDependentOn(typeof(IssuesTask))] +public class DefaultTask : FrostingTask +{ +} diff --git a/tests/frosting/net8.0/global.json b/tests/frosting/net8.0-cake-git/global.json similarity index 100% rename from tests/frosting/net8.0/global.json rename to tests/frosting/net8.0-cake-git/global.json diff --git a/tests/frosting/net8.0/nuget.config b/tests/frosting/net8.0-cake-git/nuget.config similarity index 100% rename from tests/frosting/net8.0/nuget.config rename to tests/frosting/net8.0-cake-git/nuget.config diff --git a/tests/frosting/net8.0/src/ClassLibrary1.sln b/tests/frosting/net8.0-cake-git/src/ClassLibrary1.sln similarity index 100% rename from tests/frosting/net8.0/src/ClassLibrary1.sln rename to tests/frosting/net8.0-cake-git/src/ClassLibrary1.sln diff --git a/tests/frosting/net8.0/src/ClassLibrary1/Class1.cs b/tests/frosting/net8.0-cake-git/src/ClassLibrary1/Class1.cs similarity index 100% rename from tests/frosting/net8.0/src/ClassLibrary1/Class1.cs rename to tests/frosting/net8.0-cake-git/src/ClassLibrary1/Class1.cs diff --git a/tests/frosting/net8.0/src/ClassLibrary1/ClassLibrary1.csproj b/tests/frosting/net8.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj similarity index 100% rename from tests/frosting/net8.0/src/ClassLibrary1/ClassLibrary1.csproj rename to tests/frosting/net8.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj diff --git a/tests/frosting/net9.0/build.ps1 b/tests/frosting/net8.0-git-cli/build.ps1 similarity index 100% rename from tests/frosting/net9.0/build.ps1 rename to tests/frosting/net8.0-git-cli/build.ps1 diff --git a/tests/frosting/net9.0/build.sh b/tests/frosting/net8.0-git-cli/build.sh similarity index 100% rename from tests/frosting/net9.0/build.sh rename to tests/frosting/net8.0-git-cli/build.sh diff --git a/tests/frosting/net9.0/build/.gitignore b/tests/frosting/net8.0-git-cli/build/.gitignore similarity index 100% rename from tests/frosting/net9.0/build/.gitignore rename to tests/frosting/net8.0-git-cli/build/.gitignore diff --git a/tests/frosting/net8.0-git-cli/build/Build.csproj b/tests/frosting/net8.0-git-cli/build/Build.csproj new file mode 100644 index 00000000..2edeb45f --- /dev/null +++ b/tests/frosting/net8.0-git-cli/build/Build.csproj @@ -0,0 +1,12 @@ + + + Exe + net8.0 + $(MSBuildProjectDirectory) + enable + + + + + + \ No newline at end of file diff --git a/tests/frosting/net8.0/build/Program.cs b/tests/frosting/net8.0-git-cli/build/Program.cs similarity index 100% rename from tests/frosting/net8.0/build/Program.cs rename to tests/frosting/net8.0-git-cli/build/Program.cs diff --git a/tests/script-runner/global.json b/tests/frosting/net8.0-git-cli/global.json similarity index 100% rename from tests/script-runner/global.json rename to tests/frosting/net8.0-git-cli/global.json diff --git a/tests/frosting/net9.0/nuget.config b/tests/frosting/net8.0-git-cli/nuget.config similarity index 100% rename from tests/frosting/net9.0/nuget.config rename to tests/frosting/net8.0-git-cli/nuget.config diff --git a/tests/frosting/net9.0/src/ClassLibrary1.sln b/tests/frosting/net8.0-git-cli/src/ClassLibrary1.sln similarity index 100% rename from tests/frosting/net9.0/src/ClassLibrary1.sln rename to tests/frosting/net8.0-git-cli/src/ClassLibrary1.sln diff --git a/tests/frosting/net9.0/src/ClassLibrary1/Class1.cs b/tests/frosting/net8.0-git-cli/src/ClassLibrary1/Class1.cs similarity index 100% rename from tests/frosting/net9.0/src/ClassLibrary1/Class1.cs rename to tests/frosting/net8.0-git-cli/src/ClassLibrary1/Class1.cs diff --git a/tests/frosting/net9.0/src/ClassLibrary1/ClassLibrary1.csproj b/tests/frosting/net8.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj similarity index 100% rename from tests/frosting/net9.0/src/ClassLibrary1/ClassLibrary1.csproj rename to tests/frosting/net8.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj diff --git a/tests/frosting/net9.0-cake-git/build.ps1 b/tests/frosting/net9.0-cake-git/build.ps1 new file mode 100644 index 00000000..eace4c8f --- /dev/null +++ b/tests/frosting/net9.0-cake-git/build.ps1 @@ -0,0 +1,13 @@ +$RECIPE_PACKAGE_PATH = "packages/cake.frosting.issues.recipe" +if (Test-Path $RECIPE_PACKAGE_PATH) +{ + Write-Host "Cleaning up cached version of $RECIPE_PACKAGE_PATH..." + Remove-Item $RECIPE_PACKAGE_PATH -Recurse; +} +else +{ + Write-Host "$RECIPE_PACKAGE_PATH not cached..." +} + +dotnet run --project build/Build.csproj -- $args +exit $LASTEXITCODE; \ No newline at end of file diff --git a/tests/frosting/net9.0-cake-git/build.sh b/tests/frosting/net9.0-cake-git/build.sh new file mode 100755 index 00000000..8dafc54e --- /dev/null +++ b/tests/frosting/net9.0-cake-git/build.sh @@ -0,0 +1,11 @@ + +$RECIPE_PACKAGE_PATH = "packages/cake.frosting.issues.recipe" +if [ -d "$RECIPE_PACKAGE_PATH" ] +then + echo "Cleaning up cached version of $RECIPE_PACKAGE_PATH..." + rm -Rf $RECIPE_PACKAGE_PATH +else + echo "$RECIPE_PACKAGE_PATH not cached..." +fi + +dotnet run --project ./build/Build.csproj -- "$@" diff --git a/tests/frosting/net9.0-cake-git/build/.gitignore b/tests/frosting/net9.0-cake-git/build/.gitignore new file mode 100644 index 00000000..29cb0b57 --- /dev/null +++ b/tests/frosting/net9.0-cake-git/build/.gitignore @@ -0,0 +1,2 @@ +### Cake ### +tools/* \ No newline at end of file diff --git a/tests/frosting/net9.0/build/Build.csproj b/tests/frosting/net9.0-cake-git/build/Build.csproj similarity index 100% rename from tests/frosting/net9.0/build/Build.csproj rename to tests/frosting/net9.0-cake-git/build/Build.csproj diff --git a/tests/frosting/net9.0-cake-git/build/Program.cs b/tests/frosting/net9.0-cake-git/build/Program.cs new file mode 100644 index 00000000..221b4caf --- /dev/null +++ b/tests/frosting/net9.0-cake-git/build/Program.cs @@ -0,0 +1,124 @@ +using System; +using System.Reflection; +using Cake.Common; +using Cake.Common.Diagnostics; +using Cake.Common.Tools.InspectCode; +using Cake.Core; +using Cake.Core.Diagnostics; +using Cake.Core.IO; +using Cake.Frosting; + +public static class Program +{ + public static int Main(string[] args) + { + return new CakeHost() + .UseContext() + .UseLifetime() + .InstallTool(new Uri("nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2023.3.4")) + // Register Cake.Frosting.Issues.Recipe tasks. + .AddAssembly(Assembly.GetAssembly(typeof(IssuesTask))) + .Run(args); + } +} + +public class BuildContext : IssuesContext +{ + public BuildContext(ICakeContext context) + : base(context) + { + } + + protected override BuildParameters CreateIssuesParameters() + { + return new BuildParameters(); + } + + protected override BuildState CreateIssuesState() + { + return new BuildState(this); + } +} + +public class BuildParameters : IssuesParameters +{ + public DirectoryPath LogDirectoryPath => this.OutputDirectory.Combine("logs"); + + public BuildParameters() + { + this.OutputDirectory = this.OutputDirectory.Combine("output"); + } +} + +public class BuildState : IssuesState +{ + public FilePath SolutionFilePath { get; } + + public BuildState(BuildContext context) + : base(context, RepositoryInfoProviderType.CakeGit) + { + this.SolutionFilePath = + this.ProjectRootDirectory + .Combine("src") + .CombineWithFilePath("ClassLibrary1.sln"); + } +} + +public class Lifetime : FrostingLifetime +{ + public override void Setup(BuildContext context, ISetupContext info) + { + // Determine Build Identifier + var platform = context.Environment.Platform.Family.ToString(); + var runtime = context.Environment.Runtime.IsCoreClr ? ".NET Core" : ".NET Framework"; + + context.Parameters.BuildIdentifier = $"Cake Frosting {platform} ({runtime})"; + + context.Information("Build identifier: {0}", context.Parameters.BuildIdentifier); + } + + public override void Teardown(BuildContext context, ITeardownContext info) + { + } +} + +[TaskName("Run-InspectCode")] +public sealed class RunInspectCodeTask : FrostingTask +{ + public override bool ShouldRun(BuildContext context) + { + return context.IsRunningOnWindows(); + } + + public override void Run(BuildContext context) + { + // Run InspectCode. + var inspectCodeLogFilePath = context.Parameters.LogDirectoryPath.CombineWithFilePath("inspectCode.log"); + + var settings = new InspectCodeSettings() { + OutputFile = inspectCodeLogFilePath, + ArgumentCustomization = x => x.Append("--no-build"), + WorkingDirectory = context.State.ProjectRootDirectory + }; + + context.InspectCode( + context.State.SolutionFilePath, + settings); + + // Pass path to InspectCode log file to Cake.Frosting.Issues.Recipe. + context.Parameters.InputFiles.AddInspectCodeLogFilePath(inspectCodeLogFilePath); + } +} + +[TaskName("Lint")] +[IsDependentOn(typeof(RunInspectCodeTask))] +[IsDependeeOf(typeof(ReadIssuesTask))] +public class LintTask : FrostingTask +{ +} + +[TaskName("Default")] +[IsDependentOn(typeof(IssuesTask))] +public class DefaultTask : FrostingTask +{ +} diff --git a/tests/frosting/net9.0/global.json b/tests/frosting/net9.0-cake-git/global.json similarity index 75% rename from tests/frosting/net9.0/global.json rename to tests/frosting/net9.0-cake-git/global.json index 5110c037..913686c4 100644 --- a/tests/frosting/net9.0/global.json +++ b/tests/frosting/net9.0-cake-git/global.json @@ -1,7 +1,7 @@ { "sdk": { "allowPrerelease": true, - "version": "9.0.100", + "version": "9.0.101", "rollForward": "latestFeature" } } \ No newline at end of file diff --git a/tests/frosting/net9.0-cake-git/nuget.config b/tests/frosting/net9.0-cake-git/nuget.config new file mode 100644 index 00000000..663b555f --- /dev/null +++ b/tests/frosting/net9.0-cake-git/nuget.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/src/ClassLibrary1.sln b/tests/frosting/net9.0-cake-git/src/ClassLibrary1.sln similarity index 100% rename from tests/script-runner/src/ClassLibrary1.sln rename to tests/frosting/net9.0-cake-git/src/ClassLibrary1.sln diff --git a/tests/script-runner/src/ClassLibrary1/Class1.cs b/tests/frosting/net9.0-cake-git/src/ClassLibrary1/Class1.cs similarity index 100% rename from tests/script-runner/src/ClassLibrary1/Class1.cs rename to tests/frosting/net9.0-cake-git/src/ClassLibrary1/Class1.cs diff --git a/tests/script-runner/src/ClassLibrary1/ClassLibrary1.csproj b/tests/frosting/net9.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj similarity index 100% rename from tests/script-runner/src/ClassLibrary1/ClassLibrary1.csproj rename to tests/frosting/net9.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj diff --git a/tests/frosting/net9.0-git-cli/build.ps1 b/tests/frosting/net9.0-git-cli/build.ps1 new file mode 100644 index 00000000..eace4c8f --- /dev/null +++ b/tests/frosting/net9.0-git-cli/build.ps1 @@ -0,0 +1,13 @@ +$RECIPE_PACKAGE_PATH = "packages/cake.frosting.issues.recipe" +if (Test-Path $RECIPE_PACKAGE_PATH) +{ + Write-Host "Cleaning up cached version of $RECIPE_PACKAGE_PATH..." + Remove-Item $RECIPE_PACKAGE_PATH -Recurse; +} +else +{ + Write-Host "$RECIPE_PACKAGE_PATH not cached..." +} + +dotnet run --project build/Build.csproj -- $args +exit $LASTEXITCODE; \ No newline at end of file diff --git a/tests/frosting/net9.0-git-cli/build.sh b/tests/frosting/net9.0-git-cli/build.sh new file mode 100755 index 00000000..8dafc54e --- /dev/null +++ b/tests/frosting/net9.0-git-cli/build.sh @@ -0,0 +1,11 @@ + +$RECIPE_PACKAGE_PATH = "packages/cake.frosting.issues.recipe" +if [ -d "$RECIPE_PACKAGE_PATH" ] +then + echo "Cleaning up cached version of $RECIPE_PACKAGE_PATH..." + rm -Rf $RECIPE_PACKAGE_PATH +else + echo "$RECIPE_PACKAGE_PATH not cached..." +fi + +dotnet run --project ./build/Build.csproj -- "$@" diff --git a/tests/frosting/net9.0-git-cli/build/.gitignore b/tests/frosting/net9.0-git-cli/build/.gitignore new file mode 100644 index 00000000..29cb0b57 --- /dev/null +++ b/tests/frosting/net9.0-git-cli/build/.gitignore @@ -0,0 +1,2 @@ +### Cake ### +tools/* \ No newline at end of file diff --git a/tests/frosting/net9.0-git-cli/build/Build.csproj b/tests/frosting/net9.0-git-cli/build/Build.csproj new file mode 100644 index 00000000..112c7ff6 --- /dev/null +++ b/tests/frosting/net9.0-git-cli/build/Build.csproj @@ -0,0 +1,12 @@ + + + Exe + net9.0 + $(MSBuildProjectDirectory) + enable + + + + + + \ No newline at end of file diff --git a/tests/frosting/net9.0/build/Program.cs b/tests/frosting/net9.0-git-cli/build/Program.cs similarity index 100% rename from tests/frosting/net9.0/build/Program.cs rename to tests/frosting/net9.0-git-cli/build/Program.cs diff --git a/tests/frosting/net9.0-git-cli/global.json b/tests/frosting/net9.0-git-cli/global.json new file mode 100644 index 00000000..913686c4 --- /dev/null +++ b/tests/frosting/net9.0-git-cli/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "9.0.101", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/tests/frosting/net9.0-git-cli/nuget.config b/tests/frosting/net9.0-git-cli/nuget.config new file mode 100644 index 00000000..663b555f --- /dev/null +++ b/tests/frosting/net9.0-git-cli/nuget.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/frosting/net9.0-git-cli/src/ClassLibrary1.sln b/tests/frosting/net9.0-git-cli/src/ClassLibrary1.sln new file mode 100644 index 00000000..62df92e3 --- /dev/null +++ b/tests/frosting/net9.0-git-cli/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/frosting/net9.0-git-cli/src/ClassLibrary1/Class1.cs b/tests/frosting/net9.0-git-cli/src/ClassLibrary1/Class1.cs new file mode 100644 index 00000000..4ea00049 --- /dev/null +++ b/tests/frosting/net9.0-git-cli/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/frosting/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj b/tests/frosting/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj new file mode 100644 index 00000000..4539075f --- /dev/null +++ b/tests/frosting/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + + + + + all + 3.3.2 + + + all + 1.1.118 + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/.config/dotnet-tools.json b/tests/script-runner/net8.0-cake-git/.config/dotnet-tools.json similarity index 100% rename from tests/script-runner/.config/dotnet-tools.json rename to tests/script-runner/net8.0-cake-git/.config/dotnet-tools.json diff --git a/tests/script-runner/.gitignore b/tests/script-runner/net8.0-cake-git/.gitignore similarity index 100% rename from tests/script-runner/.gitignore rename to tests/script-runner/net8.0-cake-git/.gitignore diff --git a/tests/script-runner/net8.0-cake-git/build.cake b/tests/script-runner/net8.0-cake-git/build.cake new file mode 100644 index 00000000..94d08cfa --- /dev/null +++ b/tests/script-runner/net8.0-cake-git/build.cake @@ -0,0 +1,133 @@ +#load nuget:?package=Cake.Issues.Recipe&prerelease +#load "buildData.cake" + +#addin "Cake.Markdownlint" + +#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2023.1.2 +#tool nuget:?package=MSBuild.Extension.Pack&version=1.9.1 + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +RepositoryInfoProvider = Argument("repositoryInfoProvider", RepositoryInfoProviderType.CakeGit); + +////////////////////////////////////////////////// +// SETUP / TEARDOWN +////////////////////////////////////////////////// + +Setup(setupContext => +{ + return new BuildData(setupContext); +}); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Configure-IssuesManagement") + .Does((data) => +{ + var platform = Context.Environment.Platform.Family.ToString(); + var runtime = Context.Environment.Runtime.IsCoreClr ? ".NET Core" : ".NET Framework"; + + IssuesParameters.BuildIdentifier = $"{platform} ({runtime})"; + + Information("Build identifier: {0}", IssuesParameters.BuildIdentifier); +}); + +Task("Build") + .Does((data) => +{ + var solutionFile = + data.IssuesData.BuildRootDirectory + .Combine("src") + .CombineWithFilePath("ClassLibrary1.sln"); + +#if NETCOREAPP + DotNetRestore(solutionFile.FullPath); + + var settings = + new DotNetMSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + "BinaryLogger," + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll"), + "", + data.MsBuildLogFilePath.FullPath + ); + + DotNetBuild( + solutionFile.FullPath, + new DotNetBuildSettings + { + MSBuildSettings = settings + }); +#else + NuGetRestore(solutionFile); + + var settings = + new MSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll").FullPath, + "BinaryLogger", + data.MsBuildLogFilePath.FullPath); + MSBuild(solutionFile, settings); +#endif + + // Pass path to MsBuild log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddMsBuildBinaryLogFilePath(data.MsBuildLogFilePath); +}); + +Task("Run-InspectCode") + .WithCriteria((context) => context.IsRunningOnWindows(), "InspectCode is only supported on Windows.") + .Does((data) => +{ + var settings = new InspectCodeSettings() { + OutputFile = data.InspectCodeLogFilePath, + ArgumentCustomization = x => x.Append("--no-build") + }; + + InspectCode( + data.IssuesData.BuildRootDirectory.Combine("src").CombineWithFilePath("ClassLibrary1.sln"), + settings); + + // Pass path to InspectCode log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddInspectCodeLogFilePath(data.InspectCodeLogFilePath); +}); + +Task("Lint-Documentation") + .Does((data) => +{ + var settings = + MarkdownlintNodeJsRunnerSettings.ForDirectory( + data.IssuesData.BuildRootDirectory.Combine("docs")); + settings.OutputFile = data.MarkdownlintCliLogFilePath; + settings.ThrowOnIssue = false; + RunMarkdownlintNodeJs(settings); + + // Pass path to markdownlint-cli log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddMarkdownlintCliLogFilePath(data.MarkdownlintCliLogFilePath); +}); + +Task("Lint") + .IsDependentOn("Run-InspectCode") + .IsDependentOn("Lint-Documentation"); + +// Make sure build and linters run before issues task. +IssuesBuildTasks.ReadIssuesTask + .IsDependentOn("Build") + .IsDependentOn("Lint"); + +// Run issues task by default. +Task("Default") + .IsDependentOn("Configure-IssuesManagement") + .IsDependentOn("Issues"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file diff --git a/tests/script-runner/build.ps1 b/tests/script-runner/net8.0-cake-git/build.ps1 similarity index 100% rename from tests/script-runner/build.ps1 rename to tests/script-runner/net8.0-cake-git/build.ps1 diff --git a/tests/script-runner/build.sh b/tests/script-runner/net8.0-cake-git/build.sh similarity index 100% rename from tests/script-runner/build.sh rename to tests/script-runner/net8.0-cake-git/build.sh diff --git a/tests/script-runner/buildData.cake b/tests/script-runner/net8.0-cake-git/buildData.cake similarity index 100% rename from tests/script-runner/buildData.cake rename to tests/script-runner/net8.0-cake-git/buildData.cake diff --git a/tests/script-runner/docs/index.md b/tests/script-runner/net8.0-cake-git/docs/index.md similarity index 100% rename from tests/script-runner/docs/index.md rename to tests/script-runner/net8.0-cake-git/docs/index.md diff --git a/tests/script-runner/net8.0-cake-git/global.json b/tests/script-runner/net8.0-cake-git/global.json new file mode 100644 index 00000000..db28d4c7 --- /dev/null +++ b/tests/script-runner/net8.0-cake-git/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "8.0.404", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/tests/script-runner/nuget.config b/tests/script-runner/net8.0-cake-git/nuget.config similarity index 77% rename from tests/script-runner/nuget.config rename to tests/script-runner/net8.0-cake-git/nuget.config index a202f0ab..62768c3d 100644 --- a/tests/script-runner/nuget.config +++ b/tests/script-runner/net8.0-cake-git/nuget.config @@ -2,7 +2,7 @@ - + diff --git a/tests/script-runner/net8.0-cake-git/src/ClassLibrary1.sln b/tests/script-runner/net8.0-cake-git/src/ClassLibrary1.sln new file mode 100644 index 00000000..62df92e3 --- /dev/null +++ b/tests/script-runner/net8.0-cake-git/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/script-runner/net8.0-cake-git/src/ClassLibrary1/Class1.cs b/tests/script-runner/net8.0-cake-git/src/ClassLibrary1/Class1.cs new file mode 100644 index 00000000..4ea00049 --- /dev/null +++ b/tests/script-runner/net8.0-cake-git/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/script-runner/net8.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj b/tests/script-runner/net8.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj new file mode 100644 index 00000000..4539075f --- /dev/null +++ b/tests/script-runner/net8.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + + + + + all + 3.3.2 + + + all + 1.1.118 + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net8.0-git-cli/.config/dotnet-tools.json b/tests/script-runner/net8.0-git-cli/.config/dotnet-tools.json new file mode 100644 index 00000000..43e6f74c --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "cake.tool": { + "version": "5.0.0", + "commands": [ + "dotnet-cake" + ] + } + } +} \ No newline at end of file diff --git a/tests/script-runner/net8.0-git-cli/.gitignore b/tests/script-runner/net8.0-git-cli/.gitignore new file mode 100644 index 00000000..e7c49629 --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/.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/script-runner/build.cake b/tests/script-runner/net8.0-git-cli/build.cake similarity index 100% rename from tests/script-runner/build.cake rename to tests/script-runner/net8.0-git-cli/build.cake diff --git a/tests/script-runner/net8.0-git-cli/build.ps1 b/tests/script-runner/net8.0-git-cli/build.ps1 new file mode 100644 index 00000000..fe602768 --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/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/script-runner/net8.0-git-cli/build.sh b/tests/script-runner/net8.0-git-cli/build.sh new file mode 100755 index 00000000..921a3241 --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/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/script-runner/net8.0-git-cli/buildData.cake b/tests/script-runner/net8.0-git-cli/buildData.cake new file mode 100644 index 00000000..ca5e49ad --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/buildData.cake @@ -0,0 +1,28 @@ +public class BuildData +{ + public IssuesData IssuesData { get; } + + public FilePath MsBuildLogFilePath { get; } + + public FilePath InspectCodeLogFilePath { get; } + + public FilePath MarkdownlintCliLogFilePath { get; } + + public BuildData(ICakeContext context) + { + if (context == null) + { + throw new ArgumentNullException(nameof(context)); + } + + this.IssuesData = context.Data.Get(); + + var buildArtifactsDirectory = new DirectoryPath("BuildArtifacts"); + IssuesParameters.OutputDirectory = buildArtifactsDirectory.Combine("output"); + + var logDirectory = buildArtifactsDirectory.Combine("logs"); + this.MsBuildLogFilePath = logDirectory.CombineWithFilePath("msbuild.binlog"); + this.InspectCodeLogFilePath = logDirectory.CombineWithFilePath("inspectCode.log"); + this.MarkdownlintCliLogFilePath = logDirectory.CombineWithFilePath("markdownlintCli.log"); + } +} \ No newline at end of file diff --git a/tests/script-runner/net8.0-git-cli/docs/index.md b/tests/script-runner/net8.0-git-cli/docs/index.md new file mode 100644 index 00000000..68eae708 --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/docs/index.md @@ -0,0 +1,7 @@ +# foo +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean fermentum dictum mauris, sed feugiat nibh rutrum eget. Fusce sed purus nec sem faucibus semper sed id est. Cras vestibulum leo nec ipsum posuere eleifend. Nullam iaculis quam in sapien efficitur consequat. In hac habitasse platea dictumst. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus pulvinar bibendum sapien ac ultrices. Sed imperdiet mi non felis imperdiet, at interdum ante volutpat. Pellentesque eu cursus dolor, non iaculis ipsum. Quisque in tortor viverra, sodales nibh vitae, vehicula urna. Integer dolor mauris, condimentum ac accumsan quis, placerat eget tellus. Duis volutpat interdum nisi, vel efficitur nisl viverra vitae. Maecenas eget lacus vel lacus congue lobortis. Etiam ornare dictum nulla nec commodo. + +# bar +``` +Praesent euismod est vel quam volutpat ultrices. Cras luctus lorem quis nibh tincidunt, a auctor velit fermentum. Cras et nisl neque. Sed mi lorem, efficitur et purus eu, vehicula ornare felis. Aliquam sagittis ultricies sem, nec dignissim erat porta at. Suspendisse in justo lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque ornare neque porttitor tortor auctor lobortis posuere id dui. Phasellus et felis a nibh viverra cursus ut blandit ante. Suspendisse lacus tortor, pharetra non pulvinar vulputate, semper sed augue. Aenean feugiat finibus quam quis iaculis. Maecenas ac quam quis risus scelerisque rhoncus. Donec eget aliquam metus. Nam feugiat sem dui, quis consectetur lorem lobortis in. Maecenas eu bibendum sapien. +``` \ No newline at end of file diff --git a/tests/script-runner/net8.0-git-cli/global.json b/tests/script-runner/net8.0-git-cli/global.json new file mode 100644 index 00000000..db28d4c7 --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "8.0.404", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/tests/script-runner/net8.0-git-cli/nuget.config b/tests/script-runner/net8.0-git-cli/nuget.config new file mode 100644 index 00000000..62768c3d --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/nuget.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net8.0-git-cli/src/ClassLibrary1.sln b/tests/script-runner/net8.0-git-cli/src/ClassLibrary1.sln new file mode 100644 index 00000000..62df92e3 --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/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/script-runner/net8.0-git-cli/src/ClassLibrary1/Class1.cs b/tests/script-runner/net8.0-git-cli/src/ClassLibrary1/Class1.cs new file mode 100644 index 00000000..4ea00049 --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/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/script-runner/net8.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj b/tests/script-runner/net8.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj new file mode 100644 index 00000000..4539075f --- /dev/null +++ b/tests/script-runner/net8.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + + + + + all + 3.3.2 + + + all + 1.1.118 + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/.config/dotnet-tools.json b/tests/script-runner/net9.0-cake-git/.config/dotnet-tools.json new file mode 100644 index 00000000..43e6f74c --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "cake.tool": { + "version": "5.0.0", + "commands": [ + "dotnet-cake" + ] + } + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/.gitignore b/tests/script-runner/net9.0-cake-git/.gitignore new file mode 100644 index 00000000..e7c49629 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/.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/script-runner/net9.0-cake-git/build.cake b/tests/script-runner/net9.0-cake-git/build.cake new file mode 100644 index 00000000..94d08cfa --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/build.cake @@ -0,0 +1,133 @@ +#load nuget:?package=Cake.Issues.Recipe&prerelease +#load "buildData.cake" + +#addin "Cake.Markdownlint" + +#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2023.1.2 +#tool nuget:?package=MSBuild.Extension.Pack&version=1.9.1 + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +RepositoryInfoProvider = Argument("repositoryInfoProvider", RepositoryInfoProviderType.CakeGit); + +////////////////////////////////////////////////// +// SETUP / TEARDOWN +////////////////////////////////////////////////// + +Setup(setupContext => +{ + return new BuildData(setupContext); +}); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Configure-IssuesManagement") + .Does((data) => +{ + var platform = Context.Environment.Platform.Family.ToString(); + var runtime = Context.Environment.Runtime.IsCoreClr ? ".NET Core" : ".NET Framework"; + + IssuesParameters.BuildIdentifier = $"{platform} ({runtime})"; + + Information("Build identifier: {0}", IssuesParameters.BuildIdentifier); +}); + +Task("Build") + .Does((data) => +{ + var solutionFile = + data.IssuesData.BuildRootDirectory + .Combine("src") + .CombineWithFilePath("ClassLibrary1.sln"); + +#if NETCOREAPP + DotNetRestore(solutionFile.FullPath); + + var settings = + new DotNetMSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + "BinaryLogger," + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll"), + "", + data.MsBuildLogFilePath.FullPath + ); + + DotNetBuild( + solutionFile.FullPath, + new DotNetBuildSettings + { + MSBuildSettings = settings + }); +#else + NuGetRestore(solutionFile); + + var settings = + new MSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll").FullPath, + "BinaryLogger", + data.MsBuildLogFilePath.FullPath); + MSBuild(solutionFile, settings); +#endif + + // Pass path to MsBuild log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddMsBuildBinaryLogFilePath(data.MsBuildLogFilePath); +}); + +Task("Run-InspectCode") + .WithCriteria((context) => context.IsRunningOnWindows(), "InspectCode is only supported on Windows.") + .Does((data) => +{ + var settings = new InspectCodeSettings() { + OutputFile = data.InspectCodeLogFilePath, + ArgumentCustomization = x => x.Append("--no-build") + }; + + InspectCode( + data.IssuesData.BuildRootDirectory.Combine("src").CombineWithFilePath("ClassLibrary1.sln"), + settings); + + // Pass path to InspectCode log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddInspectCodeLogFilePath(data.InspectCodeLogFilePath); +}); + +Task("Lint-Documentation") + .Does((data) => +{ + var settings = + MarkdownlintNodeJsRunnerSettings.ForDirectory( + data.IssuesData.BuildRootDirectory.Combine("docs")); + settings.OutputFile = data.MarkdownlintCliLogFilePath; + settings.ThrowOnIssue = false; + RunMarkdownlintNodeJs(settings); + + // Pass path to markdownlint-cli log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddMarkdownlintCliLogFilePath(data.MarkdownlintCliLogFilePath); +}); + +Task("Lint") + .IsDependentOn("Run-InspectCode") + .IsDependentOn("Lint-Documentation"); + +// Make sure build and linters run before issues task. +IssuesBuildTasks.ReadIssuesTask + .IsDependentOn("Build") + .IsDependentOn("Lint"); + +// Run issues task by default. +Task("Default") + .IsDependentOn("Configure-IssuesManagement") + .IsDependentOn("Issues"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/build.ps1 b/tests/script-runner/net9.0-cake-git/build.ps1 new file mode 100644 index 00000000..fe602768 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/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/script-runner/net9.0-cake-git/build.sh b/tests/script-runner/net9.0-cake-git/build.sh new file mode 100755 index 00000000..921a3241 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/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/script-runner/net9.0-cake-git/buildData.cake b/tests/script-runner/net9.0-cake-git/buildData.cake new file mode 100644 index 00000000..ca5e49ad --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/buildData.cake @@ -0,0 +1,28 @@ +public class BuildData +{ + public IssuesData IssuesData { get; } + + public FilePath MsBuildLogFilePath { get; } + + public FilePath InspectCodeLogFilePath { get; } + + public FilePath MarkdownlintCliLogFilePath { get; } + + public BuildData(ICakeContext context) + { + if (context == null) + { + throw new ArgumentNullException(nameof(context)); + } + + this.IssuesData = context.Data.Get(); + + var buildArtifactsDirectory = new DirectoryPath("BuildArtifacts"); + IssuesParameters.OutputDirectory = buildArtifactsDirectory.Combine("output"); + + var logDirectory = buildArtifactsDirectory.Combine("logs"); + this.MsBuildLogFilePath = logDirectory.CombineWithFilePath("msbuild.binlog"); + this.InspectCodeLogFilePath = logDirectory.CombineWithFilePath("inspectCode.log"); + this.MarkdownlintCliLogFilePath = logDirectory.CombineWithFilePath("markdownlintCli.log"); + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/docs/index.md b/tests/script-runner/net9.0-cake-git/docs/index.md new file mode 100644 index 00000000..68eae708 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/docs/index.md @@ -0,0 +1,7 @@ +# foo +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean fermentum dictum mauris, sed feugiat nibh rutrum eget. Fusce sed purus nec sem faucibus semper sed id est. Cras vestibulum leo nec ipsum posuere eleifend. Nullam iaculis quam in sapien efficitur consequat. In hac habitasse platea dictumst. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus pulvinar bibendum sapien ac ultrices. Sed imperdiet mi non felis imperdiet, at interdum ante volutpat. Pellentesque eu cursus dolor, non iaculis ipsum. Quisque in tortor viverra, sodales nibh vitae, vehicula urna. Integer dolor mauris, condimentum ac accumsan quis, placerat eget tellus. Duis volutpat interdum nisi, vel efficitur nisl viverra vitae. Maecenas eget lacus vel lacus congue lobortis. Etiam ornare dictum nulla nec commodo. + +# bar +``` +Praesent euismod est vel quam volutpat ultrices. Cras luctus lorem quis nibh tincidunt, a auctor velit fermentum. Cras et nisl neque. Sed mi lorem, efficitur et purus eu, vehicula ornare felis. Aliquam sagittis ultricies sem, nec dignissim erat porta at. Suspendisse in justo lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque ornare neque porttitor tortor auctor lobortis posuere id dui. Phasellus et felis a nibh viverra cursus ut blandit ante. Suspendisse lacus tortor, pharetra non pulvinar vulputate, semper sed augue. Aenean feugiat finibus quam quis iaculis. Maecenas ac quam quis risus scelerisque rhoncus. Donec eget aliquam metus. Nam feugiat sem dui, quis consectetur lorem lobortis in. Maecenas eu bibendum sapien. +``` \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/global.json b/tests/script-runner/net9.0-cake-git/global.json new file mode 100644 index 00000000..913686c4 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "9.0.101", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/nuget.config b/tests/script-runner/net9.0-cake-git/nuget.config new file mode 100644 index 00000000..62768c3d --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/nuget.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net9.0-cake-git/src/ClassLibrary1.sln b/tests/script-runner/net9.0-cake-git/src/ClassLibrary1.sln new file mode 100644 index 00000000..62df92e3 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/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/script-runner/net9.0-cake-git/src/ClassLibrary1/Class1.cs b/tests/script-runner/net9.0-cake-git/src/ClassLibrary1/Class1.cs new file mode 100644 index 00000000..4ea00049 --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/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/script-runner/net9.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj b/tests/script-runner/net9.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj new file mode 100644 index 00000000..4539075f --- /dev/null +++ b/tests/script-runner/net9.0-cake-git/src/ClassLibrary1/ClassLibrary1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + + + + + all + 3.3.2 + + + all + 1.1.118 + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/.config/dotnet-tools.json b/tests/script-runner/net9.0-git-cli/.config/dotnet-tools.json new file mode 100644 index 00000000..43e6f74c --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "cake.tool": { + "version": "5.0.0", + "commands": [ + "dotnet-cake" + ] + } + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/.gitignore b/tests/script-runner/net9.0-git-cli/.gitignore new file mode 100644 index 00000000..e7c49629 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/.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/script-runner/net9.0-git-cli/build.cake b/tests/script-runner/net9.0-git-cli/build.cake new file mode 100644 index 00000000..bbfcef21 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/build.cake @@ -0,0 +1,133 @@ +#load nuget:?package=Cake.Issues.Recipe&prerelease +#load "buildData.cake" + +#addin "Cake.Markdownlint" + +#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2023.1.2 +#tool nuget:?package=MSBuild.Extension.Pack&version=1.9.1 + +////////////////////////////////////////////////// +// ARGUMENTS +////////////////////////////////////////////////// + +var target = Argument("target", "Default"); + +RepositoryInfoProvider = Argument("repositoryInfoProvider", RepositoryInfoProviderType.Cli); + +////////////////////////////////////////////////// +// SETUP / TEARDOWN +////////////////////////////////////////////////// + +Setup(setupContext => +{ + return new BuildData(setupContext); +}); + +////////////////////////////////////////////////// +// TARGETS +////////////////////////////////////////////////// + +Task("Configure-IssuesManagement") + .Does((data) => +{ + var platform = Context.Environment.Platform.Family.ToString(); + var runtime = Context.Environment.Runtime.IsCoreClr ? ".NET Core" : ".NET Framework"; + + IssuesParameters.BuildIdentifier = $"{platform} ({runtime})"; + + Information("Build identifier: {0}", IssuesParameters.BuildIdentifier); +}); + +Task("Build") + .Does((data) => +{ + var solutionFile = + data.IssuesData.BuildRootDirectory + .Combine("src") + .CombineWithFilePath("ClassLibrary1.sln"); + +#if NETCOREAPP + DotNetRestore(solutionFile.FullPath); + + var settings = + new DotNetMSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + "BinaryLogger," + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll"), + "", + data.MsBuildLogFilePath.FullPath + ); + + DotNetBuild( + solutionFile.FullPath, + new DotNetBuildSettings + { + MSBuildSettings = settings + }); +#else + NuGetRestore(solutionFile); + + var settings = + new MSBuildSettings() + .WithTarget("Rebuild") + .WithLogger( + Context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll").FullPath, + "BinaryLogger", + data.MsBuildLogFilePath.FullPath); + MSBuild(solutionFile, settings); +#endif + + // Pass path to MsBuild log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddMsBuildBinaryLogFilePath(data.MsBuildLogFilePath); +}); + +Task("Run-InspectCode") + .WithCriteria((context) => context.IsRunningOnWindows(), "InspectCode is only supported on Windows.") + .Does((data) => +{ + var settings = new InspectCodeSettings() { + OutputFile = data.InspectCodeLogFilePath, + ArgumentCustomization = x => x.Append("--no-build") + }; + + InspectCode( + data.IssuesData.BuildRootDirectory.Combine("src").CombineWithFilePath("ClassLibrary1.sln"), + settings); + + // Pass path to InspectCode log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddInspectCodeLogFilePath(data.InspectCodeLogFilePath); +}); + +Task("Lint-Documentation") + .Does((data) => +{ + var settings = + MarkdownlintNodeJsRunnerSettings.ForDirectory( + data.IssuesData.BuildRootDirectory.Combine("docs")); + settings.OutputFile = data.MarkdownlintCliLogFilePath; + settings.ThrowOnIssue = false; + RunMarkdownlintNodeJs(settings); + + // Pass path to markdownlint-cli log file to Cake.Issues.Recipe + IssuesParameters.InputFiles.AddMarkdownlintCliLogFilePath(data.MarkdownlintCliLogFilePath); +}); + +Task("Lint") + .IsDependentOn("Run-InspectCode") + .IsDependentOn("Lint-Documentation"); + +// Make sure build and linters run before issues task. +IssuesBuildTasks.ReadIssuesTask + .IsDependentOn("Build") + .IsDependentOn("Lint"); + +// Run issues task by default. +Task("Default") + .IsDependentOn("Configure-IssuesManagement") + .IsDependentOn("Issues"); + +////////////////////////////////////////////////// +// EXECUTION +////////////////////////////////////////////////// + +RunTarget(target); \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/build.ps1 b/tests/script-runner/net9.0-git-cli/build.ps1 new file mode 100644 index 00000000..fe602768 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/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/script-runner/net9.0-git-cli/build.sh b/tests/script-runner/net9.0-git-cli/build.sh new file mode 100755 index 00000000..921a3241 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/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/script-runner/net9.0-git-cli/buildData.cake b/tests/script-runner/net9.0-git-cli/buildData.cake new file mode 100644 index 00000000..ca5e49ad --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/buildData.cake @@ -0,0 +1,28 @@ +public class BuildData +{ + public IssuesData IssuesData { get; } + + public FilePath MsBuildLogFilePath { get; } + + public FilePath InspectCodeLogFilePath { get; } + + public FilePath MarkdownlintCliLogFilePath { get; } + + public BuildData(ICakeContext context) + { + if (context == null) + { + throw new ArgumentNullException(nameof(context)); + } + + this.IssuesData = context.Data.Get(); + + var buildArtifactsDirectory = new DirectoryPath("BuildArtifacts"); + IssuesParameters.OutputDirectory = buildArtifactsDirectory.Combine("output"); + + var logDirectory = buildArtifactsDirectory.Combine("logs"); + this.MsBuildLogFilePath = logDirectory.CombineWithFilePath("msbuild.binlog"); + this.InspectCodeLogFilePath = logDirectory.CombineWithFilePath("inspectCode.log"); + this.MarkdownlintCliLogFilePath = logDirectory.CombineWithFilePath("markdownlintCli.log"); + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/docs/index.md b/tests/script-runner/net9.0-git-cli/docs/index.md new file mode 100644 index 00000000..68eae708 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/docs/index.md @@ -0,0 +1,7 @@ +# foo +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean fermentum dictum mauris, sed feugiat nibh rutrum eget. Fusce sed purus nec sem faucibus semper sed id est. Cras vestibulum leo nec ipsum posuere eleifend. Nullam iaculis quam in sapien efficitur consequat. In hac habitasse platea dictumst. Interdum et malesuada fames ac ante ipsum primis in faucibus. Vivamus pulvinar bibendum sapien ac ultrices. Sed imperdiet mi non felis imperdiet, at interdum ante volutpat. Pellentesque eu cursus dolor, non iaculis ipsum. Quisque in tortor viverra, sodales nibh vitae, vehicula urna. Integer dolor mauris, condimentum ac accumsan quis, placerat eget tellus. Duis volutpat interdum nisi, vel efficitur nisl viverra vitae. Maecenas eget lacus vel lacus congue lobortis. Etiam ornare dictum nulla nec commodo. + +# bar +``` +Praesent euismod est vel quam volutpat ultrices. Cras luctus lorem quis nibh tincidunt, a auctor velit fermentum. Cras et nisl neque. Sed mi lorem, efficitur et purus eu, vehicula ornare felis. Aliquam sagittis ultricies sem, nec dignissim erat porta at. Suspendisse in justo lacus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque ornare neque porttitor tortor auctor lobortis posuere id dui. Phasellus et felis a nibh viverra cursus ut blandit ante. Suspendisse lacus tortor, pharetra non pulvinar vulputate, semper sed augue. Aenean feugiat finibus quam quis iaculis. Maecenas ac quam quis risus scelerisque rhoncus. Donec eget aliquam metus. Nam feugiat sem dui, quis consectetur lorem lobortis in. Maecenas eu bibendum sapien. +``` \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/global.json b/tests/script-runner/net9.0-git-cli/global.json new file mode 100644 index 00000000..913686c4 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "allowPrerelease": true, + "version": "9.0.101", + "rollForward": "latestFeature" + } +} \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/nuget.config b/tests/script-runner/net9.0-git-cli/nuget.config new file mode 100644 index 00000000..62768c3d --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/nuget.config @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/tests/script-runner/net9.0-git-cli/src/ClassLibrary1.sln b/tests/script-runner/net9.0-git-cli/src/ClassLibrary1.sln new file mode 100644 index 00000000..62df92e3 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/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/script-runner/net9.0-git-cli/src/ClassLibrary1/Class1.cs b/tests/script-runner/net9.0-git-cli/src/ClassLibrary1/Class1.cs new file mode 100644 index 00000000..4ea00049 --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/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/script-runner/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj b/tests/script-runner/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj new file mode 100644 index 00000000..4539075f --- /dev/null +++ b/tests/script-runner/net9.0-git-cli/src/ClassLibrary1/ClassLibrary1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + + + + + all + 3.3.2 + + + all + 1.1.118 + + + + + + + \ No newline at end of file