From e01602ff364bb990d95b128ab467754aa49c0aeb Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 6 Dec 2024 06:46:32 -0700 Subject: [PATCH 1/7] Re-enable packing of MessagePack.Experimental --- src/MessagePack.Experimental/MessagePack.Experimental.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/MessagePack.Experimental/MessagePack.Experimental.csproj b/src/MessagePack.Experimental/MessagePack.Experimental.csproj index 080559755..bcd48e6de 100644 --- a/src/MessagePack.Experimental/MessagePack.Experimental.csproj +++ b/src/MessagePack.Experimental/MessagePack.Experimental.csproj @@ -7,8 +7,6 @@ Codestin Search App Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). Experimental implementations. MsgPack;MessagePack;Serialization;Formatter;Serializer - - false From a27fa8a87fcc4579057195d120e815378fba251a Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 6 Dec 2024 06:48:59 -0700 Subject: [PATCH 2/7] Fix version.json --- version.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/version.json b/version.json index 9b6e39b23..ece494c1c 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,7 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "3.0.300", + "version": "3.0", + "versionHeightOffset": 300, "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v1\\.x$", From cb5e3cfff089b9aef38437a9753f490ca6539feb Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Fri, 6 Dec 2024 06:50:55 -0700 Subject: [PATCH 3/7] Bump Nerdbank.GitVersioning to 3.6.146 --- .config/dotnet-tools.json | 4 ++-- Directory.Packages.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index b668e6db3..38ac18578 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,10 +15,10 @@ ] }, "nbgv": { - "version": "3.6.143", + "version": "3.6.146", "commands": [ "nbgv" ] } } -} \ No newline at end of file +} diff --git a/Directory.Packages.props b/Directory.Packages.props index ad892297e..888cb4a46 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -74,7 +74,7 @@ - + From 6cb1d19ed5937533ce3e56e52e59cb11763cd9cb Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 8 Dec 2024 19:21:20 -0700 Subject: [PATCH 4/7] Build and pack release config on CI/PR --- .github/workflows/{build-debug.yml => dotnet.yml} | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) rename .github/workflows/{build-debug.yml => dotnet.yml} (68%) diff --git a/.github/workflows/build-debug.yml b/.github/workflows/dotnet.yml similarity index 68% rename from .github/workflows/build-debug.yml rename to .github/workflows/dotnet.yml index faa647e48..578c78cd3 100644 --- a/.github/workflows/build-debug.yml +++ b/.github/workflows/dotnet.yml @@ -1,4 +1,4 @@ -name: Run .NET Debug Build and Test +name: Run .NET Build and Test on: workflow_dispatch: @@ -11,9 +11,6 @@ on: - master - develop -env: - BUILD_CONFIG: Debug - jobs: build-dotnet: runs-on: ubuntu-latest @@ -23,5 +20,5 @@ jobs: with: fetch-depth: 0 # avoid shallow clone so nbgv can do its work. - uses: ./.github/actions/setup-dotnet - - run: dotnet build -c ${{ env.BUILD_CONFIG }} - - run: dotnet test -c ${{ env.BUILD_CONFIG }} --no-build + - run: dotnet build -c Release -t:build,pack + - run: dotnet test -c Release --no-build From 8624ba2448e256632f71c2f302c021804c54b39d Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Sun, 8 Dec 2024 19:33:10 -0700 Subject: [PATCH 5/7] Remove azure-pipelines folder and references --- .vscode/settings.json | 5 - MessagePack.sln | 2 - .../Get-ArtifactsStagingDirectory.ps1 | 15 -- azure-pipelines/Get-CodeCovTool.ps1 | 86 ----------- azure-pipelines/Get-LibTemplateBasis.ps1 | 25 --- azure-pipelines/Get-NuGetTool.ps1 | 22 --- azure-pipelines/Get-ProcDump.ps1 | 14 -- azure-pipelines/Get-SymbolFiles.ps1 | 66 -------- azure-pipelines/Merge-CodeCoverage.ps1 | 51 ------ azure-pipelines/artifacts/Variables.ps1 | 43 ------ azure-pipelines/artifacts/_all.ps1 | 72 --------- azure-pipelines/artifacts/_pipelines.ps1 | 45 ------ azure-pipelines/artifacts/_stage_all.ps1 | 72 --------- azure-pipelines/artifacts/build_logs.ps1 | 7 - azure-pipelines/artifacts/coverageResults.ps1 | 23 --- azure-pipelines/artifacts/deployables.ps1 | 13 -- .../artifacts/projectAssetsJson.ps1 | 9 -- azure-pipelines/artifacts/symbols.ps1 | 7 - azure-pipelines/artifacts/testResults.ps1 | 15 -- azure-pipelines/artifacts/test_symbols.ps1 | 7 - azure-pipelines/build.yml | 76 --------- azure-pipelines/dotnet-test-cloud.ps1 | 83 ---------- azure-pipelines/dotnet.yml | 30 ---- azure-pipelines/install-dependencies.yml | 25 --- azure-pipelines/justnugetorg.nuget.config | 7 - azure-pipelines/libtemplate-update.yml | 146 ------------------ azure-pipelines/publish-CodeCov.ps1 | 30 ---- azure-pipelines/publish-codecoverage.yml | 24 --- azure-pipelines/publish-deployables.yml | 8 - azure-pipelines/publish-symbols.yml | 59 ------- azure-pipelines/release.yml | 62 -------- azure-pipelines/test.runsettings | 44 ------ .../variables/DotNetSdkVersion.ps1 | 2 - azure-pipelines/variables/_all.ps1 | 20 --- azure-pipelines/variables/_pipelines.ps1 | 31 ---- init.ps1 | 6 - tools/DotNetSdkVersion.ps1 | 2 + .../Get-TempToolsPath.ps1 | 0 tools/Install-DotNetSdk.ps1 | 2 +- tools/Install-NuGetCredProvider.ps1 | 2 +- tools/MergeFrom-Template.ps1 | 79 ---------- 41 files changed, 4 insertions(+), 1333 deletions(-) delete mode 100644 azure-pipelines/Get-ArtifactsStagingDirectory.ps1 delete mode 100644 azure-pipelines/Get-CodeCovTool.ps1 delete mode 100644 azure-pipelines/Get-LibTemplateBasis.ps1 delete mode 100644 azure-pipelines/Get-NuGetTool.ps1 delete mode 100644 azure-pipelines/Get-ProcDump.ps1 delete mode 100644 azure-pipelines/Get-SymbolFiles.ps1 delete mode 100644 azure-pipelines/Merge-CodeCoverage.ps1 delete mode 100644 azure-pipelines/artifacts/Variables.ps1 delete mode 100755 azure-pipelines/artifacts/_all.ps1 delete mode 100644 azure-pipelines/artifacts/_pipelines.ps1 delete mode 100644 azure-pipelines/artifacts/_stage_all.ps1 delete mode 100644 azure-pipelines/artifacts/build_logs.ps1 delete mode 100644 azure-pipelines/artifacts/coverageResults.ps1 delete mode 100644 azure-pipelines/artifacts/deployables.ps1 delete mode 100644 azure-pipelines/artifacts/projectAssetsJson.ps1 delete mode 100644 azure-pipelines/artifacts/symbols.ps1 delete mode 100644 azure-pipelines/artifacts/testResults.ps1 delete mode 100644 azure-pipelines/artifacts/test_symbols.ps1 delete mode 100644 azure-pipelines/build.yml delete mode 100644 azure-pipelines/dotnet-test-cloud.ps1 delete mode 100644 azure-pipelines/dotnet.yml delete mode 100644 azure-pipelines/install-dependencies.yml delete mode 100644 azure-pipelines/justnugetorg.nuget.config delete mode 100644 azure-pipelines/libtemplate-update.yml delete mode 100644 azure-pipelines/publish-CodeCov.ps1 delete mode 100644 azure-pipelines/publish-codecoverage.yml delete mode 100644 azure-pipelines/publish-deployables.yml delete mode 100644 azure-pipelines/publish-symbols.yml delete mode 100644 azure-pipelines/release.yml delete mode 100644 azure-pipelines/test.runsettings delete mode 100644 azure-pipelines/variables/DotNetSdkVersion.ps1 delete mode 100755 azure-pipelines/variables/_all.ps1 delete mode 100644 azure-pipelines/variables/_pipelines.ps1 create mode 100644 tools/DotNetSdkVersion.ps1 rename {azure-pipelines => tools}/Get-TempToolsPath.ps1 (100%) delete mode 100644 tools/MergeFrom-Template.ps1 diff --git a/.vscode/settings.json b/.vscode/settings.json index 0311bb6db..7743c118d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,11 +9,6 @@ "[xml]": { "editor.wordWrap": "off" }, - // Treat these files as Azure Pipelines files - "files.associations": { - "**/azure-pipelines/**/*.yml": "azure-pipelines", - "azure-pipelines.yml": "azure-pipelines" - }, // Use Prettier as the default formatter for Azure Pipelines files. // Needs to be explicitly configured: https://github.com/Microsoft/azure-pipelines-vscode#document-formatting "[azure-pipelines]": { diff --git a/MessagePack.sln b/MessagePack.sln index 01d1a8e1d..20bb730cd 100644 --- a/MessagePack.sln +++ b/MessagePack.sln @@ -51,8 +51,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{301F812B-8AEE-4DC2-8009-4510F02294AD}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig - azure-pipelines.yml = azure-pipelines.yml - azure-pipelines\build.yml = azure-pipelines\build.yml Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props global.json = global.json diff --git a/azure-pipelines/Get-ArtifactsStagingDirectory.ps1 b/azure-pipelines/Get-ArtifactsStagingDirectory.ps1 deleted file mode 100644 index 391e5713a..000000000 --- a/azure-pipelines/Get-ArtifactsStagingDirectory.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -Param( - [switch]$CleanIfLocal -) -if ($env:BUILD_ARTIFACTSTAGINGDIRECTORY) { - $ArtifactStagingFolder = $env:BUILD_ARTIFACTSTAGINGDIRECTORY -} elseif ($env:RUNNER_TEMP) { - $ArtifactStagingFolder = "$env:RUNNER_TEMP\_artifacts" -} else { - $ArtifactStagingFolder = [System.IO.Path]::GetFullPath("$PSScriptRoot/../obj/_artifacts") - if ($CleanIfLocal -and (Test-Path $ArtifactStagingFolder)) { - Remove-Item $ArtifactStagingFolder -Recurse -Force - } -} - -$ArtifactStagingFolder diff --git a/azure-pipelines/Get-CodeCovTool.ps1 b/azure-pipelines/Get-CodeCovTool.ps1 deleted file mode 100644 index ca580b4db..000000000 --- a/azure-pipelines/Get-CodeCovTool.ps1 +++ /dev/null @@ -1,86 +0,0 @@ -<# -.SYNOPSIS - Downloads the CodeCov.io uploader tool and returns the path to it. -.PARAMETER AllowSkipVerify - Allows skipping signature verification of the downloaded tool if gpg is not installed. -#> -[CmdletBinding()] -Param( - [switch]$AllowSkipVerify -) - -if ($IsMacOS) { - $codeCovUrl = "https://uploader.codecov.io/latest/macos/codecov" - $toolName = 'codecov' -} -elseif ($IsLinux) { - $codeCovUrl = "https://uploader.codecov.io/latest/linux/codecov" - $toolName = 'codecov' -} -else { - $codeCovUrl = "https://uploader.codecov.io/latest/windows/codecov.exe" - $toolName = 'codecov.exe' -} - -$shaSuffix = ".SHA256SUM" -$sigSuffix = $shaSuffix + ".sig" - -Function Get-FileFromWeb([Uri]$Uri, $OutDir) { - $OutFile = Join-Path $OutDir $Uri.Segments[-1] - if (!(Test-Path $OutFile)) { - Write-Verbose "Downloading $Uri..." - if (!(Test-Path $OutDir)) { New-Item -ItemType Directory -Path $OutDir | Out-Null } - try { - (New-Object System.Net.WebClient).DownloadFile($Uri, $OutFile) - } finally { - # This try/finally causes the script to abort - } - } - - $OutFile -} - -$toolsPath = & "$PSScriptRoot\Get-TempToolsPath.ps1" -$binaryToolsPath = Join-Path $toolsPath codecov -$testingPath = Join-Path $binaryToolsPath unverified -$finalToolPath = Join-Path $binaryToolsPath $toolName - -if (!(Test-Path $finalToolPath)) { - if (Test-Path $testingPath) { - Remove-Item -Recurse -Force $testingPath # ensure we download all matching files - } - $tool = Get-FileFromWeb $codeCovUrl $testingPath - $sha = Get-FileFromWeb "$codeCovUrl$shaSuffix" $testingPath - $sig = Get-FileFromWeb "$codeCovUrl$sigSuffix" $testingPath - $key = Get-FileFromWeb https://keybase.io/codecovsecurity/pgp_keys.asc $testingPath - - if ((Get-Command gpg -ErrorAction SilentlyContinue)) { - Write-Host "Importing codecov key" -ForegroundColor Yellow - gpg --import $key - Write-Host "Verifying signature on codecov hash" -ForegroundColor Yellow - gpg --verify $sig $sha - } else { - if ($AllowSkipVerify) { - Write-Warning "gpg not found. Unable to verify hash signature." - } else { - throw "gpg not found. Unable to verify hash signature. Install gpg or add -AllowSkipVerify to override." - } - } - - Write-Host "Verifying hash on downloaded tool" -ForegroundColor Yellow - $actualHash = (Get-FileHash -Path $tool -Algorithm SHA256).Hash - $expectedHash = (Get-Content $sha).Split()[0] - if ($actualHash -ne $expectedHash) { - # Validation failed. Delete the tool so we can't execute it. - #Remove-Item $codeCovPath - throw "codecov uploader tool failed signature validation." - } - - Copy-Item $tool $finalToolPath - - if ($IsMacOS -or $IsLinux) { - chmod u+x $finalToolPath - } -} - -return $finalToolPath diff --git a/azure-pipelines/Get-LibTemplateBasis.ps1 b/azure-pipelines/Get-LibTemplateBasis.ps1 deleted file mode 100644 index 2181c77b6..000000000 --- a/azure-pipelines/Get-LibTemplateBasis.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -<# -.SYNOPSIS - Returns the name of the well-known branch in the Library.Template repository upon which HEAD is based. -#> -[CmdletBinding(SupportsShouldProcess = $true)] -Param( - [switch]$ErrorIfNotRelated -) - -# This list should be sorted in order of decreasing specificity. -$branchMarkers = @( - @{ commit = 'fd0a7b25ccf030bbd16880cca6efe009d5b1fffc'; branch = 'microbuild' }; - @{ commit = '05f49ce799c1f9cc696d53eea89699d80f59f833'; branch = 'main' }; -) - -foreach ($entry in $branchMarkers) { - if (git rev-list HEAD | Select-String -Pattern $entry.commit) { - return $entry.branch - } -} - -if ($ErrorIfNotRelated) { - Write-Error "Library.Template has not been previously merged with this repo. Please review https://github.com/AArnott/Library.Template/tree/main?tab=readme-ov-file#readme for instructions." - exit 1 -} diff --git a/azure-pipelines/Get-NuGetTool.ps1 b/azure-pipelines/Get-NuGetTool.ps1 deleted file mode 100644 index 3097c8736..000000000 --- a/azure-pipelines/Get-NuGetTool.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -<# -.SYNOPSIS - Downloads the NuGet.exe tool and returns the path to it. -.PARAMETER NuGetVersion - The version of the NuGet tool to acquire. -#> -Param( - [Parameter()] - [string]$NuGetVersion='6.4.0' -) - -$toolsPath = & "$PSScriptRoot\Get-TempToolsPath.ps1" -$binaryToolsPath = Join-Path $toolsPath $NuGetVersion -if (!(Test-Path $binaryToolsPath)) { $null = mkdir $binaryToolsPath } -$nugetPath = Join-Path $binaryToolsPath nuget.exe - -if (!(Test-Path $nugetPath)) { - Write-Host "Downloading nuget.exe $NuGetVersion..." -ForegroundColor Yellow - (New-Object System.Net.WebClient).DownloadFile("https://dist.nuget.org/win-x86-commandline/v$NuGetVersion/NuGet.exe", $nugetPath) -} - -return (Resolve-Path $nugetPath).Path diff --git a/azure-pipelines/Get-ProcDump.ps1 b/azure-pipelines/Get-ProcDump.ps1 deleted file mode 100644 index 1493fe4b2..000000000 --- a/azure-pipelines/Get-ProcDump.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -<# -.SYNOPSIS -Downloads 32-bit and 64-bit procdump executables and returns the path to where they were installed. -#> -$version = '0.0.1' -$baseDir = "$PSScriptRoot\..\obj\tools" -$procDumpToolPath = "$baseDir\procdump.$version\bin" -if (-not (Test-Path $procDumpToolPath)) { - if (-not (Test-Path $baseDir)) { New-Item -Type Directory -Path $baseDir | Out-Null } - $baseDir = (Resolve-Path $baseDir).Path # Normalize it - & (& $PSScriptRoot\Get-NuGetTool.ps1) install procdump -version $version -PackageSaveMode nuspec -OutputDirectory $baseDir -Source https://api.nuget.org/v3/index.json | Out-Null -} - -(Resolve-Path $procDumpToolPath).Path diff --git a/azure-pipelines/Get-SymbolFiles.ps1 b/azure-pipelines/Get-SymbolFiles.ps1 deleted file mode 100644 index b5063cec6..000000000 --- a/azure-pipelines/Get-SymbolFiles.ps1 +++ /dev/null @@ -1,66 +0,0 @@ -<# -.SYNOPSIS - Collect the list of PDBs built in this repo. -.PARAMETER Path - The directory to recursively search for PDBs. -.PARAMETER Tests - A switch indicating to find PDBs only for test binaries instead of only for shipping shipping binaries. -#> -[CmdletBinding()] -param ( - [parameter(Mandatory=$true)] - [string]$Path, - [switch]$Tests -) - -$ActivityName = "Collecting symbols from $Path" -Write-Progress -Activity $ActivityName -CurrentOperation "Discovery PDB files" -$PDBs = Get-ChildItem -rec "$Path/*.pdb" - -# Filter PDBs to product OR test related. -$testregex = "unittest|tests|\.test\." - -Write-Progress -Activity $ActivityName -CurrentOperation "De-duplicating symbols" -$PDBsByHash = @{} -$i = 0 -$PDBs |% { - Write-Progress -Activity $ActivityName -CurrentOperation "De-duplicating symbols" -PercentComplete (100 * $i / $PDBs.Length) - $hash = Get-FileHash $_ - $i++ - Add-Member -InputObject $_ -MemberType NoteProperty -Name Hash -Value $hash.Hash - Write-Output $_ -} | Sort-Object CreationTime |% { - # De-dupe based on hash. Prefer the first match so we take the first built copy. - if (-not $PDBsByHash.ContainsKey($_.Hash)) { - $PDBsByHash.Add($_.Hash, $_.FullName) - Write-Output $_ - } -} |? { - if ($Tests) { - $_.FullName -match $testregex - } else { - $_.FullName -notmatch $testregex - } -} |% { - # Collect the DLLs/EXEs as well. - $rootName = "$($_.Directory)/$($_.BaseName)" - if ($rootName.EndsWith('.ni')) { - $rootName = $rootName.Substring(0, $rootName.Length - 3) - } - - $dllPath = "$rootName.dll" - $exePath = "$rootName.exe" - if (Test-Path $dllPath) { - $BinaryImagePath = $dllPath - } elseif (Test-Path $exePath) { - $BinaryImagePath = $exePath - } else { - Write-Warning "`"$_`" found with no matching binary file." - $BinaryImagePath = $null - } - - if ($BinaryImagePath) { - Write-Output $BinaryImagePath - Write-Output $_.FullName - } -} diff --git a/azure-pipelines/Merge-CodeCoverage.ps1 b/azure-pipelines/Merge-CodeCoverage.ps1 deleted file mode 100644 index 5ecabbc9b..000000000 --- a/azure-pipelines/Merge-CodeCoverage.ps1 +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env pwsh - -<# -.SYNOPSIS - Merges code coverage reports. -.PARAMETER Path - The path(s) to search for Cobertura code coverage reports. -.PARAMETER Format - The format for the merged result. The default is Cobertura -.PARAMETER OutputDir - The directory the merged result will be written to. The default is `coveragereport` in the root of this repo. -#> -[CmdletBinding()] -Param( - [Parameter(Mandatory=$true)] - [string[]]$Path, - [ValidateSet('Badges', 'Clover', 'Cobertura', 'CsvSummary', 'Html', 'Html_Dark', 'Html_Light', 'HtmlChart', 'HtmlInline', 'HtmlInline_AzurePipelines', 'HtmlInline_AzurePipelines_Dark', 'HtmlInline_AzurePipelines_Light', 'HtmlSummary', 'JsonSummary', 'Latex', 'LatexSummary', 'lcov', 'MarkdownSummary', 'MHtml', 'PngChart', 'SonarQube', 'TeamCitySummary', 'TextSummary', 'Xml', 'XmlSummary')] - [string]$Format='Cobertura', - [string]$OutputFile=("$PSScriptRoot/../coveragereport/merged.cobertura.xml") -) - -$RepoRoot = [string](Resolve-Path $PSScriptRoot/..) -Push-Location $RepoRoot -try { - Write-Verbose "Searching $Path for *.cobertura.xml files" - $reports = Get-ChildItem -Recurse $Path -Filter *.cobertura.xml - - if ($reports) { - $reports |% { $_.FullName } |% { - # In addition to replacing {reporoot}, we also normalize on one kind of slash so that the report aggregates data for a file whether data was collected on Windows or not. - $xml = [xml](Get-Content -Path $_) - $xml.coverage.packages.package.classes.class |? { $_.filename} |% { - $_.filename = $_.filename.Replace('{reporoot}', $RepoRoot).Replace([IO.Path]::AltDirectorySeparatorChar, [IO.Path]::DirectorySeparatorChar) - } - - $xml.Save($_) - } - - $Inputs = $reports |% { Resolve-Path -relative $_.FullName } - - if ((Split-Path $OutputFile) -and -not (Test-Path (Split-Path $OutputFile))) { - New-Item -Type Directory -Path (Split-Path $OutputFile) | Out-Null - } - - & dotnet tool run dotnet-coverage merge $Inputs -o $OutputFile -f cobertura - } else { - Write-Error "No reports found to merge." - } -} finally { - Pop-Location -} diff --git a/azure-pipelines/artifacts/Variables.ps1 b/azure-pipelines/artifacts/Variables.ps1 deleted file mode 100644 index 4bc6d2165..000000000 --- a/azure-pipelines/artifacts/Variables.ps1 +++ /dev/null @@ -1,43 +0,0 @@ -# This artifact captures all variables defined in the ..\variables folder. -# It "snaps" the values of these variables where we can compute them during the build, -# and otherwise captures the scripts to run later during an Azure Pipelines environment release. - -$RepoRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot/../..") -$ArtifactBasePath = "$RepoRoot/obj/_artifacts" -$VariablesArtifactPath = Join-Path $ArtifactBasePath variables -if (-not (Test-Path $VariablesArtifactPath)) { New-Item -ItemType Directory -Path $VariablesArtifactPath | Out-Null } - -# Copy variables, either by value if the value is calculable now, or by script -Get-ChildItem "$PSScriptRoot/../variables" |% { - $value = $null - if (-not $_.BaseName.StartsWith('_')) { # Skip trying to interpret special scripts - # First check the environment variables in case the variable was set in a queued build - # Always use all caps for env var access because Azure Pipelines converts variables to upper-case for env vars, - # and on non-Windows env vars are case sensitive. - $envVarName = $_.BaseName.ToUpper() - if (Test-Path env:$envVarName) { - $value = Get-Content "env:$envVarName" - } - - # If that didn't give us anything, try executing the script right now from its original position - if (-not $value) { - $value = & $_.FullName - } - - if ($value) { - # We got something, so wrap it with quotes so it's treated like a literal value. - $value = "'$value'" - } - } - - # If that didn't get us anything, just copy the script itself - if (-not $value) { - $value = Get-Content -Path $_.FullName - } - - Set-Content -Path "$VariablesArtifactPath/$($_.Name)" -Value $value -} - -@{ - "$VariablesArtifactPath" = (Get-ChildItem $VariablesArtifactPath -Recurse); -} diff --git a/azure-pipelines/artifacts/_all.ps1 b/azure-pipelines/artifacts/_all.ps1 deleted file mode 100755 index 9a22a1d08..000000000 --- a/azure-pipelines/artifacts/_all.ps1 +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env pwsh - -<# -.SYNOPSIS - This script returns all the artifacts that should be collected after a build. - Each powershell artifact is expressed as an object with these properties: - Source - the full path to the source file - ArtifactName - the name of the artifact to upload to - ContainerFolder - the relative path within the artifact in which the file should appear - Each artifact aggregating .ps1 script should return a hashtable: - Key = path to the directory from which relative paths within the artifact should be calculated - Value = an array of paths (absolute or relative to the BaseDirectory) to files to include in the artifact. - FileInfo objects are also allowed. -.PARAMETER Force - Executes artifact scripts even if they have already been staged. -#> - -[CmdletBinding(SupportsShouldProcess = $true)] -param ( - [string]$ArtifactNameSuffix, - [switch]$Force -) - -Function EnsureTrailingSlash($path) { - if ($path.length -gt 0 -and !$path.EndsWith('\') -and !$path.EndsWith('/')) { - $path = $path + [IO.Path]::DirectorySeparatorChar - } - - $path.Replace('\', [IO.Path]::DirectorySeparatorChar) -} - -Function Test-ArtifactStaged($artifactName) { - $varName = "ARTIFACTSTAGED_$($artifactName.ToUpper())" - Test-Path "env:$varName" -} - -Get-ChildItem "$PSScriptRoot\*.ps1" -Exclude "_*" -Recurse | % { - $ArtifactName = $_.BaseName - if ($Force -or !(Test-ArtifactStaged($ArtifactName + $ArtifactNameSuffix))) { - $totalFileCount = 0 - Write-Verbose "Collecting file list for artifact $($_.BaseName)" - $fileGroups = & $_ - if ($fileGroups) { - $fileGroups.GetEnumerator() | % { - $BaseDirectory = New-Object Uri ((EnsureTrailingSlash $_.Key.ToString()), [UriKind]::Absolute) - $_.Value | ? { $_ } | % { - if ($_.GetType() -eq [IO.FileInfo] -or $_.GetType() -eq [IO.DirectoryInfo]) { - $_ = $_.FullName - } - - $artifact = New-Object -TypeName PSObject - Add-Member -InputObject $artifact -MemberType NoteProperty -Name ArtifactName -Value $ArtifactName - - $SourceFullPath = New-Object Uri ($BaseDirectory, $_) - Add-Member -InputObject $artifact -MemberType NoteProperty -Name Source -Value $SourceFullPath.LocalPath - - $RelativePath = [Uri]::UnescapeDataString($BaseDirectory.MakeRelative($SourceFullPath)) - Add-Member -InputObject $artifact -MemberType NoteProperty -Name ContainerFolder -Value (Split-Path $RelativePath) - - Write-Output $artifact - $totalFileCount += 1 - } - } - } - - if ($totalFileCount -eq 0) { - Write-Warning "No files found for the `"$ArtifactName`" artifact." - } - } else { - Write-Host "Skipping $ArtifactName because it has already been staged." -ForegroundColor DarkGray - } -} diff --git a/azure-pipelines/artifacts/_pipelines.ps1 b/azure-pipelines/artifacts/_pipelines.ps1 deleted file mode 100644 index 47321ed5b..000000000 --- a/azure-pipelines/artifacts/_pipelines.ps1 +++ /dev/null @@ -1,45 +0,0 @@ -<# -.SYNOPSIS - This script translates all the artifacts described by _all.ps1 - into commands that instruct Azure Pipelines to actually collect those artifacts. -#> - -[CmdletBinding()] -param ( - [string]$ArtifactNameSuffix, - [switch]$StageOnly, - [switch]$AvoidSymbolicLinks -) - -Function Set-PipelineVariable($name, $value) { - if ((Test-Path "Env:\$name") -and (Get-Item "Env:\$name").Value -eq $value) { - return # already set - } - - #New-Item -Path "Env:\$name".ToUpper() -Value $value -Force | Out-Null - Write-Host "##vso[task.setvariable variable=$name]$value" -} - -Function Test-ArtifactUploaded($artifactName) { - $varName = "ARTIFACTUPLOADED_$($artifactName.ToUpper())" - Test-Path "env:$varName" -} - -& "$PSScriptRoot/_stage_all.ps1" -ArtifactNameSuffix $ArtifactNameSuffix -AvoidSymbolicLinks:$AvoidSymbolicLinks |% { - # Set a variable which will out-live this script so that a subsequent attempt to collect and upload artifacts - # will skip this one from a check in the _all.ps1 script. - Set-PipelineVariable "ARTIFACTSTAGED_$($_.Name.ToUpper())" 'true' - Write-Host "Staged artifact $($_.Name) to $($_.Path)" - - if (!$StageOnly) { - if (Test-ArtifactUploaded $_.Name) { - Write-Host "Skipping $($_.Name) because it has already been uploaded." -ForegroundColor DarkGray - } else { - Write-Host "##vso[artifact.upload containerfolder=$($_.Name);artifactname=$($_.Name);]$($_.Path)" - - # Set a variable which will out-live this script so that a subsequent attempt to collect and upload artifacts - # will skip this one from a check in the _all.ps1 script. - Set-PipelineVariable "ARTIFACTUPLOADED_$($_.Name.ToUpper())" 'true' - } - } -} diff --git a/azure-pipelines/artifacts/_stage_all.ps1 b/azure-pipelines/artifacts/_stage_all.ps1 deleted file mode 100644 index 74d7a38df..000000000 --- a/azure-pipelines/artifacts/_stage_all.ps1 +++ /dev/null @@ -1,72 +0,0 @@ -<# -.SYNOPSIS - This script links all the artifacts described by _all.ps1 - into a staging directory, reading for uploading to a cloud build artifact store. - It returns a sequence of objects with Name and Path properties. -#> - -[CmdletBinding()] -param ( - [string]$ArtifactNameSuffix, - [switch]$AvoidSymbolicLinks -) - -$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal - -function Create-SymbolicLink { - param ( - $Link, - $Target - ) - - if ($Link -eq $Target) { - return - } - - if (Test-Path $Link) { Remove-Item $Link } - $LinkContainer = Split-Path $Link -Parent - if (!(Test-Path $LinkContainer)) { mkdir $LinkContainer } - if ($IsMacOS -or $IsLinux) { - ln $Target $Link | Out-Null - } else { - cmd /c "mklink `"$Link`" `"$Target`"" | Out-Null - } - - if ($LASTEXITCODE -ne 0) { - # Windows requires admin privileges to create symbolic links - # unless Developer Mode has been enabled. - throw "Failed to create symbolic link at $Link that points to $Target" - } -} - -# Stage all artifacts -$Artifacts = & "$PSScriptRoot\_all.ps1" -ArtifactNameSuffix $ArtifactNameSuffix -$Artifacts |% { - $DestinationFolder = [System.IO.Path]::GetFullPath("$ArtifactStagingFolder/$($_.ArtifactName)$ArtifactNameSuffix/$($_.ContainerFolder)").TrimEnd('\') - $Name = "$(Split-Path $_.Source -Leaf)" - - #Write-Host "$($_.Source) -> $($_.ArtifactName)\$($_.ContainerFolder)" -ForegroundColor Yellow - - if (-not (Test-Path $DestinationFolder)) { New-Item -ItemType Directory -Path $DestinationFolder | Out-Null } - if (Test-Path -PathType Leaf $_.Source) { # skip folders - $TargetPath = Join-Path $DestinationFolder $Name - if ($AvoidSymbolicLinks) { - Copy-Item -Path $_.Source -Destination $TargetPath - } else { - Create-SymbolicLink -Link $TargetPath -Target $_.Source - } - } -} - -$ArtifactNames = $Artifacts |% { "$($_.ArtifactName)$ArtifactNameSuffix" } -$ArtifactNames += Get-ChildItem env:ARTIFACTSTAGED_* |% { - # Return from ALLCAPS to the actual capitalization used for the artifact. - $artifactNameAllCaps = "$($_.Name.Substring('ARTIFACTSTAGED_'.Length))" - (Get-ChildItem $ArtifactStagingFolder\$artifactNameAllCaps* -Filter $artifactNameAllCaps).Name -} -$ArtifactNames | Get-Unique |% { - $artifact = New-Object -TypeName PSObject - Add-Member -InputObject $artifact -MemberType NoteProperty -Name Name -Value $_ - Add-Member -InputObject $artifact -MemberType NoteProperty -Name Path -Value (Join-Path $ArtifactStagingFolder $_) - Write-Output $artifact -} diff --git a/azure-pipelines/artifacts/build_logs.ps1 b/azure-pipelines/artifacts/build_logs.ps1 deleted file mode 100644 index f05358e03..000000000 --- a/azure-pipelines/artifacts/build_logs.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" - -if (!(Test-Path $ArtifactStagingFolder/build_logs)) { return } - -@{ - "$ArtifactStagingFolder/build_logs" = (Get-ChildItem -Recurse "$ArtifactStagingFolder/build_logs") -} diff --git a/azure-pipelines/artifacts/coverageResults.ps1 b/azure-pipelines/artifacts/coverageResults.ps1 deleted file mode 100644 index d2fee5016..000000000 --- a/azure-pipelines/artifacts/coverageResults.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -$RepoRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..") - -$coverageFiles = @(Get-ChildItem "$RepoRoot/tests/*.cobertura.xml" -Recurse | Where {$_.FullName -notlike "*/In/*" -and $_.FullName -notlike "*\In\*" }) - -# Prepare code coverage reports for merging on another machine -if ($env:SYSTEM_DEFAULTWORKINGDIRECTORY) { - Write-Host "Substituting $env:SYSTEM_DEFAULTWORKINGDIRECTORY with `"{reporoot}`"" - $coverageFiles |% { - $content = Get-Content -Path $_ |% { $_ -Replace [regex]::Escape($env:SYSTEM_DEFAULTWORKINGDIRECTORY), "{reporoot}" } - Set-Content -Path $_ -Value $content -Encoding UTF8 - } -} else { - Write-Warning "coverageResults: Azure Pipelines not detected. Machine-neutral token replacement skipped." -} - -if (!((Test-Path $RepoRoot\bin) -and (Test-Path $RepoRoot\obj))) { return } - -@{ - $RepoRoot = ( - $coverageFiles + - (Get-ChildItem "$RepoRoot\obj\*.cs" -Recurse) - ); -} diff --git a/azure-pipelines/artifacts/deployables.ps1 b/azure-pipelines/artifacts/deployables.ps1 deleted file mode 100644 index 94c48cdd9..000000000 --- a/azure-pipelines/artifacts/deployables.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -$RepoRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..") -$BuildConfiguration = $env:BUILDCONFIGURATION -if (!$BuildConfiguration) { - $BuildConfiguration = 'Debug' -} - -$PackagesRoot = "$RepoRoot/bin/Packages/$BuildConfiguration" - -if (!(Test-Path $PackagesRoot)) { return } - -@{ - "$PackagesRoot" = (Get-ChildItem $PackagesRoot -Recurse) -} diff --git a/azure-pipelines/artifacts/projectAssetsJson.ps1 b/azure-pipelines/artifacts/projectAssetsJson.ps1 deleted file mode 100644 index d2e85ffbe..000000000 --- a/azure-pipelines/artifacts/projectAssetsJson.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -$ObjRoot = [System.IO.Path]::GetFullPath("$PSScriptRoot\..\..\obj") - -if (!(Test-Path $ObjRoot)) { return } - -@{ - "$ObjRoot" = ( - (Get-ChildItem "$ObjRoot\project.assets.json" -Recurse) - ); -} diff --git a/azure-pipelines/artifacts/symbols.ps1 b/azure-pipelines/artifacts/symbols.ps1 deleted file mode 100644 index 9e2c7bd5b..000000000 --- a/azure-pipelines/artifacts/symbols.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot/../../bin") -if (!(Test-Path $BinPath)) { return } -$symbolfiles = & "$PSScriptRoot/../Get-SymbolFiles.ps1" -Path $BinPath | Get-Unique - -@{ - "$BinPath" = $SymbolFiles; -} diff --git a/azure-pipelines/artifacts/testResults.ps1 b/azure-pipelines/artifacts/testResults.ps1 deleted file mode 100644 index 6c042043a..000000000 --- a/azure-pipelines/artifacts/testResults.ps1 +++ /dev/null @@ -1,15 +0,0 @@ -[CmdletBinding()] -Param( -) - -$result = @{} - -$testRoot = Resolve-Path "$PSScriptRoot\..\..\tests" -$result[$testRoot] = (Get-ChildItem "$testRoot\TestResults" -Recurse -Directory | Get-ChildItem -Recurse -File) - -$testlogsPath = "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\test_logs" -if (Test-Path $testlogsPath) { - $result[$testlogsPath] = Get-ChildItem "$testlogsPath\*"; -} - -$result diff --git a/azure-pipelines/artifacts/test_symbols.ps1 b/azure-pipelines/artifacts/test_symbols.ps1 deleted file mode 100644 index ce2b6481c..000000000 --- a/azure-pipelines/artifacts/test_symbols.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -$BinPath = [System.IO.Path]::GetFullPath("$PSScriptRoot/../../bin") -if (!(Test-Path $BinPath)) { return } -$symbolfiles = & "$PSScriptRoot/../Get-SymbolFiles.ps1" -Path $BinPath -Tests | Get-Unique - -@{ - "$BinPath" = $SymbolFiles; -} diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml deleted file mode 100644 index 39a0a0623..000000000 --- a/azure-pipelines/build.yml +++ /dev/null @@ -1,76 +0,0 @@ -parameters: -- name: windowsPool - type: object - default: - vmImage: windows-2022 -- name: includeMacOS - type: boolean -- name: RunTests - type: boolean - default: true - -jobs: -- job: Windows - pool: ${{ parameters.windowsPool }} - steps: - - checkout: self - fetchDepth: 0 # avoid shallow clone so nbgv can do its work. - clean: true - - template: install-dependencies.yml - - - script: dotnet nbgv cloud -c - displayName: โš™ Set build number - - - template: dotnet.yml - parameters: - RunTests: ${{ parameters.RunTests }} - -- job: Linux - pool: - vmImage: Ubuntu-22.04 - steps: - - checkout: self - fetchDepth: 0 # avoid shallow clone so nbgv can do its work. - clean: true - - template: install-dependencies.yml - - template: dotnet.yml - parameters: - RunTests: ${{ parameters.RunTests }} - - script: dotnet format --verify-no-changes --no-restore - displayName: ๐Ÿ’… Verify formatted code - -- job: macOS - condition: ${{ parameters.includeMacOS }} - pool: - vmImage: macOS-14 - steps: - - checkout: self - fetchDepth: 0 # avoid shallow clone so nbgv can do its work. - clean: true - - template: install-dependencies.yml - - template: dotnet.yml - parameters: - RunTests: ${{ parameters.RunTests }} - -- job: WrapUp - dependsOn: - - Windows - - Linux - - macOS - pool: ${{ parameters.windowsPool }} # Use Windows agent because PublishSymbols task requires it (https://github.com/microsoft/azure-pipelines-tasks/issues/13821). - condition: succeededOrFailed() - steps: - - checkout: self - fetchDepth: 0 # avoid shallow clone so nbgv can do its work. - clean: true - - template: install-dependencies.yml - parameters: - initArgs: -NoRestore - - template: publish-symbols.yml - parameters: - includeMacOS: ${{ parameters.includeMacOS }} - - ${{ if parameters.RunTests }}: - - template: publish-codecoverage.yml - parameters: - includeMacOS: ${{ parameters.includeMacOS }} - - template: publish-deployables.yml diff --git a/azure-pipelines/dotnet-test-cloud.ps1 b/azure-pipelines/dotnet-test-cloud.ps1 deleted file mode 100644 index 13f973cd4..000000000 --- a/azure-pipelines/dotnet-test-cloud.ps1 +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env pwsh - -<# -.SYNOPSIS - Runs tests as they are run in cloud test runs. -.PARAMETER Configuration - The configuration within which to run tests -.PARAMETER Agent - The name of the agent. This is used in preparing test run titles. -.PARAMETER PublishResults - A switch to publish results to Azure Pipelines. -.PARAMETER x86 - A switch to run the tests in an x86 process. -.PARAMETER dotnet32 - The path to a 32-bit dotnet executable to use. -#> -[CmdletBinding()] -Param( - [string]$Configuration='Debug', - [string]$Agent='Local', - [switch]$PublishResults, - [switch]$x86, - [string]$dotnet32 -) - -$RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path -$ArtifactStagingFolder = & "$PSScriptRoot/Get-ArtifactsStagingDirectory.ps1" - -$dotnet = 'dotnet' -if ($x86) { - $x86RunTitleSuffix = ", x86" - if ($dotnet32) { - $dotnet = $dotnet32 - } else { - $dotnet32Possibilities = "$PSScriptRoot\../obj/tools/x86/.dotnet/dotnet.exe", "$env:AGENT_TOOLSDIRECTORY/x86/dotnet/dotnet.exe", "${env:ProgramFiles(x86)}\dotnet\dotnet.exe" - $dotnet32Matches = $dotnet32Possibilities |? { Test-Path $_ } - if ($dotnet32Matches) { - $dotnet = Resolve-Path @($dotnet32Matches)[0] - Write-Host "Running tests using `"$dotnet`"" -ForegroundColor DarkGray - } else { - Write-Error "Unable to find 32-bit dotnet.exe" - return 1 - } - } -} - -& $dotnet test $RepoRoot ` - --no-build ` - -c $Configuration ` - --filter "TestCategory!=FailsInCloudTest" ` - --collect "Code Coverage;Format=cobertura" ` - --settings "$PSScriptRoot/test.runsettings" ` - --blame-hang-timeout 60s ` - --blame-crash ` - -bl:"$ArtifactStagingFolder/build_logs/test.binlog" ` - --diag "$ArtifactStagingFolder/test_logs/diag.log;TraceLevel=info" ` - --logger trx ` - -$unknownCounter = 0 -Get-ChildItem -Recurse -Path $RepoRoot\tests\*.trx |% { - Copy-Item $_ -Destination $ArtifactStagingFolder/test_logs/ - - if ($PublishResults) { - $x = [xml](Get-Content -Path $_) - $runTitle = $null - if ($x.TestRun.TestDefinitions -and $x.TestRun.TestDefinitions.GetElementsByTagName('UnitTest')) { - $storage = $x.TestRun.TestDefinitions.GetElementsByTagName('UnitTest')[0].storage -replace '\\','/' - if ($storage -match '/(?net[^/]+)/(?:(?[^/]+)/)?(?[^/]+)\.dll$') { - if ($matches.rid) { - $runTitle = "$($matches.lib) ($($matches.tfm), $($matches.rid), $Agent)" - } else { - $runTitle = "$($matches.lib) ($($matches.tfm)$x86RunTitleSuffix, $Agent)" - } - } - } - if (!$runTitle) { - $unknownCounter += 1; - $runTitle = "unknown$unknownCounter ($Agent$x86RunTitleSuffix)"; - } - - Write-Host "##vso[results.publish type=VSTest;runTitle=$runTitle;publishRunAttachments=true;resultFiles=$_;failTaskOnFailedTests=true;testRunSystem=VSTS - PTR;]" - } -} diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml deleted file mode 100644 index b422cfc91..000000000 --- a/azure-pipelines/dotnet.yml +++ /dev/null @@ -1,30 +0,0 @@ -parameters: - RunTests: - -steps: - -- script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904 /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog" - displayName: ๐Ÿ›  dotnet build - -- powershell: azure-pipelines/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults - displayName: ๐Ÿงช dotnet test - condition: and(succeeded(), ${{ parameters.RunTests }}) - -- powershell: azure-pipelines/variables/_pipelines.ps1 - failOnStderr: true - displayName: โš™ Update pipeline variables based on build outputs - condition: succeededOrFailed() - -- powershell: azure-pipelines/artifacts/_pipelines.ps1 -ArtifactNameSuffix "-$(Agent.JobName)" -Verbose - failOnStderr: true - displayName: ๐Ÿ“ข Publish artifacts - condition: succeededOrFailed() - -- ${{ if and(ne(variables['codecov_token'], ''), parameters.RunTests) }}: - - powershell: | - $ArtifactStagingFolder = & "azure-pipelines/Get-ArtifactsStagingDirectory.ps1" - $CoverageResultsFolder = Join-Path $ArtifactStagingFolder "coverageResults-$(Agent.JobName)" - azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "$(codecov_token)" -PathToCodeCoverage "$CoverageResultsFolder" -Name "$(Agent.JobName) Coverage Results" -Flags "$(Agent.JobName)Host,$(BuildConfiguration)" - displayName: ๐Ÿ“ข Publish code coverage results to codecov.io - timeoutInMinutes: 3 - continueOnError: true diff --git a/azure-pipelines/install-dependencies.yml b/azure-pipelines/install-dependencies.yml deleted file mode 100644 index 817826689..000000000 --- a/azure-pipelines/install-dependencies.yml +++ /dev/null @@ -1,25 +0,0 @@ -parameters: - initArgs: - -steps: - -- task: NuGetAuthenticate@1 - displayName: ๐Ÿ” Authenticate NuGet feeds - inputs: - forceReinstallCredentialProvider: true - -- powershell: | - $AccessToken = '$(System.AccessToken)' # Avoid specifying the access token directly on the init.ps1 command line to avoid it showing up in errors - .\init.ps1 -AccessToken $AccessToken ${{ parameters['initArgs'] }} -UpgradePrerequisites -NoNuGetCredProvider - dotnet --info - - # Print mono version if it is present. - if (Get-Command mono -ErrorAction SilentlyContinue) { - mono --version - } - displayName: โš™ Install prerequisites - -- powershell: azure-pipelines/variables/_pipelines.ps1 - failOnStderr: true - displayName: โš™ Set pipeline variables based on source - name: SetPipelineVariables diff --git a/azure-pipelines/justnugetorg.nuget.config b/azure-pipelines/justnugetorg.nuget.config deleted file mode 100644 index 765346e53..000000000 --- a/azure-pipelines/justnugetorg.nuget.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/azure-pipelines/libtemplate-update.yml b/azure-pipelines/libtemplate-update.yml deleted file mode 100644 index 87302b067..000000000 --- a/azure-pipelines/libtemplate-update.yml +++ /dev/null @@ -1,146 +0,0 @@ -# This pipeline schedules regular merges of Library.Template into a repo that is based on it. -# Only Azure Repos are supported. GitHub support comes via a GitHub Actions workflow. - -trigger: none -pr: none -schedules: -- cron: "0 3 * * Mon" # Sun @ 8 or 9 PM Mountain Time (depending on DST) - displayName: Weekly trigger - branches: - include: - - main - always: true - -parameters: -- name: AutoComplete - displayName: Auto-complete pull request - type: boolean - default: false - -stages: -- stage: Merge - jobs: - - job: merge - pool: - vmImage: ubuntu-latest - steps: - - checkout: self - fetchDepth: 0 - clean: true - - pwsh: | - $LibTemplateBranch = & ./azure-pipelines/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated - if ($LASTEXITCODE -ne 0) { - exit $LASTEXITCODE - } - - git fetch https://github.com/aarnott/Library.Template $LibTemplateBranch - if ($LASTEXITCODE -ne 0) { - exit $LASTEXITCODE - } - $LibTemplateCommit = git rev-parse FETCH_HEAD - - if ((git rev-list FETCH_HEAD ^HEAD --count) -eq 0) { - Write-Host "There are no Library.Template updates to merge." - exit 0 - } - - $UpdateBranchName = 'auto/libtemplateUpdate' - git -c http.extraheader="AUTHORIZATION: bearer $(System.AccessToken)" push origin -f FETCH_HEAD:refs/heads/$UpdateBranchName - - Write-Host "Creating pull request" - $contentType = 'application/json'; - $headers = @{ Authorization = 'Bearer $(System.AccessToken)' }; - $rawRequest = @{ - sourceRefName = "refs/heads/$UpdateBranchName"; - targetRefName = "refs/heads/main"; - title = 'Merge latest Library.Template'; - description = "This merges the latest features and fixes from [Library.Template's $LibTemplateBranch branch](https://github.com/AArnott/Library.Template/tree/$LibTemplateBranch)."; - } - $request = ConvertTo-Json $rawRequest - - $prApiBaseUri = '$(System.TeamFoundationCollectionUri)/$(System.TeamProject)/_apis/git/repositories/$(Build.Repository.ID)/pullrequests' - $prCreationUri = $prApiBaseUri + "?api-version=6.0" - Write-Host "POST $prCreationUri" - Write-Host $request - - $prCreationResult = Invoke-RestMethod -uri $prCreationUri -method POST -Headers $headers -ContentType $contentType -Body $request - $prUrl = "$($prCreationResult.repository.webUrl)/pullrequest/$($prCreationResult.pullRequestId)" - Write-Host "Pull request: $prUrl" - $prApiBaseUri += "/$($prCreationResult.pullRequestId)" - - $SummaryPath = Join-Path '$(Agent.TempDirectory)' 'summary.md' - Set-Content -Path $SummaryPath -Value "[Insertion pull request]($prUrl)" - Write-Host "##vso[task.uploadsummary]$SummaryPath" - - # Tag the PR - $tagUri = "$prApiBaseUri/labels?api-version=7.0" - $rawRequest = @{ - name = 'auto-template-merge'; - } - $request = ConvertTo-Json $rawRequest - Invoke-RestMethod -uri $tagUri -method POST -Headers $headers -ContentType $contentType -Body $request | Out-Null - - # Add properties to the PR that we can programatically parse later. - Function Set-PRProperties($properties) { - $rawRequest = $properties.GetEnumerator() |% { - @{ - op = 'add' - path = "/$($_.key)" - from = $null - value = $_.value - } - } - $request = ConvertTo-Json $rawRequest - $setPrPropertyUri = "$prApiBaseUri/properties?api-version=7.0" - Write-Debug "$request" - $setPrPropertyResult = Invoke-RestMethod -uri $setPrPropertyUri -method PATCH -Headers $headers -ContentType 'application/json-patch+json' -Body $request -StatusCodeVariable setPrPropertyStatus -SkipHttpErrorCheck - if ($setPrPropertyStatus -ne 200) { - Write-Host "##vso[task.logissue type=warning]Failed to set pull request properties. Result: $setPrPropertyStatus. $($setPrPropertyResult.message)" - } - } - Write-Host "Setting pull request properties" - Set-PRProperties @{ - 'AutomatedMerge.SourceBranch' = $LibTemplateBranch - 'AutomatedMerge.SourceCommit' = $LibTemplateCommit - } - - # Add an *active* PR comment to warn users to *merge* the pull request instead of squash it. - $request = ConvertTo-Json @{ - comments = @( - @{ - parentCommentId = 0 - content = "Do **not** squash this pull request when completing it. You must *merge* it." - commentType = 'system' - } - ) - status = 'active' - } - $result = Invoke-RestMethod -uri "$prApiBaseUri/threads?api-version=7.1" -method POST -Headers $headers -ContentType $contentType -Body $request -StatusCodeVariable addCommentStatus -SkipHttpErrorCheck - if ($addCommentStatus -ne 200) { - Write-Host "##vso[task.logissue type=warning]Failed to post comment on pull request. Result: $addCommentStatus. $($result.message)" - } - - # Set auto-complete on the PR - if ('${{ parameters.AutoComplete }}' -eq 'True') { - Write-Host "Setting auto-complete" - $mergeMessage = "Merged PR $($prCreationResult.pullRequestId): " + $commitMessage - $rawRequest = @{ - autoCompleteSetBy = @{ - id = $prCreationResult.createdBy.id - }; - completionOptions = @{ - deleteSourceBranch = $true; - mergeCommitMessage = $mergeMessage; - mergeStrategy = 'noFastForward'; - }; - } - $request = ConvertTo-Json $rawRequest - Write-Host $request - $uri = "$($prApiBaseUri)?api-version=6.0" - $result = Invoke-RestMethod -uri $uri -method PATCH -Headers $headers -ContentType $contentType -Body $request -StatusCodeVariable autoCompleteStatus -SkipHttpErrorCheck - if ($autoCompleteStatus -ne 200) { - Write-Host "##vso[task.logissue type=warning]Failed to set auto-complete on pull request. Result: $autoCompleteStatus. $($result.message)" - } - } - - displayName: Create pull request diff --git a/azure-pipelines/publish-CodeCov.ps1 b/azure-pipelines/publish-CodeCov.ps1 deleted file mode 100644 index 9926f0188..000000000 --- a/azure-pipelines/publish-CodeCov.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -<# -.SYNOPSIS - Uploads code coverage to codecov.io -.PARAMETER CodeCovToken - Code coverage token to use -.PARAMETER PathToCodeCoverage - Path to root of code coverage files -.PARAMETER Name - Name to upload with codecoverge -.PARAMETER Flags - Flags to upload with codecoverge -#> -[CmdletBinding()] -Param ( - [Parameter(Mandatory=$true)] - [string]$CodeCovToken, - [Parameter(Mandatory=$true)] - [string]$PathToCodeCoverage, - [string]$Name, - [string]$Flags -) - -$RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path - -Get-ChildItem -Recurse -Path $PathToCodeCoverage -Filter "*.cobertura.xml" | % { - $relativeFilePath = Resolve-Path -relative $_.FullName - - Write-Host "Uploading: $relativeFilePath" -ForegroundColor Yellow - & (& "$PSScriptRoot/Get-CodeCovTool.ps1") -t $CodeCovToken -f $relativeFilePath -R $RepoRoot -F $Flags -n $Name -} diff --git a/azure-pipelines/publish-codecoverage.yml b/azure-pipelines/publish-codecoverage.yml deleted file mode 100644 index 8ec94e64a..000000000 --- a/azure-pipelines/publish-codecoverage.yml +++ /dev/null @@ -1,24 +0,0 @@ -parameters: - includeMacOS: - -steps: -- download: current - artifact: coverageResults-Windows - displayName: ๐Ÿ”ป Download Windows code coverage results - continueOnError: true -- download: current - artifact: coverageResults-Linux - displayName: ๐Ÿ”ป Download Linux code coverage results - continueOnError: true -- download: current - artifact: coverageResults-macOS - displayName: ๐Ÿ”ป Download macOS code coverage results - continueOnError: true - condition: and(succeeded(), ${{ parameters.includeMacOS }}) -- powershell: azure-pipelines/Merge-CodeCoverage.ps1 -Path '$(Pipeline.Workspace)' -OutputFile coveragereport/merged.cobertura.xml -Format Cobertura -Verbose - displayName: โš™ Merge coverage -- task: PublishCodeCoverageResults@2 - displayName: ๐Ÿ“ข Publish code coverage results to Azure DevOps - inputs: - summaryFileLocation: coveragereport/merged.cobertura.xml - failIfCoverageEmpty: true diff --git a/azure-pipelines/publish-deployables.yml b/azure-pipelines/publish-deployables.yml deleted file mode 100644 index 31e80a437..000000000 --- a/azure-pipelines/publish-deployables.yml +++ /dev/null @@ -1,8 +0,0 @@ -steps: -- download: current - displayName: ๐Ÿ”ป Download deployables - artifact: deployables-Windows - -- powershell: dotnet nuget push "$(Resolve-Path '$(Pipeline.Workspace)\deployables-Windows\')*.nupkg" -s $(ci_feed) -k azdo --skip-duplicate - displayName: ๐Ÿ“ฆ Push packages to CI feed - condition: and(succeeded(), ne(variables['ci_feed'], ''), ne(variables['Build.Reason'], 'PullRequest')) diff --git a/azure-pipelines/publish-symbols.yml b/azure-pipelines/publish-symbols.yml deleted file mode 100644 index 00c188fc3..000000000 --- a/azure-pipelines/publish-symbols.yml +++ /dev/null @@ -1,59 +0,0 @@ -parameters: - includeMacOS: - -steps: -- task: DownloadPipelineArtifact@2 - inputs: - artifact: symbols-Windows - path: $(Pipeline.Workspace)/symbols/Windows - displayName: ๐Ÿ”ป Download Windows symbols - continueOnError: true -- task: DownloadPipelineArtifact@2 - inputs: - artifact: symbols-Linux - path: $(Pipeline.Workspace)/symbols/Linux - displayName: ๐Ÿ”ป Download Linux symbols - continueOnError: true -- task: DownloadPipelineArtifact@2 - inputs: - artifact: symbols-macOS - path: $(Pipeline.Workspace)/symbols/macOS - displayName: ๐Ÿ”ป Download macOS symbols - continueOnError: true - condition: ${{ parameters.includeMacOS }} - -- task: DownloadPipelineArtifact@2 - inputs: - artifact: test_symbols-Windows - path: $(Pipeline.Workspace)/test_symbols/Windows - displayName: ๐Ÿ”ป Download Windows test symbols - continueOnError: true -- task: DownloadPipelineArtifact@2 - inputs: - artifact: test_symbols-Linux - path: $(Pipeline.Workspace)/test_symbols/Linux - displayName: ๐Ÿ”ป Download Linux test symbols - continueOnError: true -- task: DownloadPipelineArtifact@2 - inputs: - artifact: test_symbols-macOS - path: $(Pipeline.Workspace)/test_symbols/macOS - displayName: ๐Ÿ”ป Download macOS test symbols - continueOnError: true - condition: ${{ parameters.includeMacOS }} - -- task: PublishSymbols@2 - inputs: - SymbolsFolder: $(Pipeline.Workspace)/symbols - SearchPattern: '**/*.pdb' - IndexSources: false - SymbolServerType: TeamServices - displayName: ๐Ÿ“ข Publish symbols - -- task: PublishSymbols@2 - inputs: - SymbolsFolder: $(Pipeline.Workspace)/test_symbols - SearchPattern: '**/*.pdb' - IndexSources: false - SymbolServerType: TeamServices - displayName: ๐Ÿ“ข Publish test symbols diff --git a/azure-pipelines/release.yml b/azure-pipelines/release.yml deleted file mode 100644 index be5c4f614..000000000 --- a/azure-pipelines/release.yml +++ /dev/null @@ -1,62 +0,0 @@ -trigger: none # We only want to trigger manually or based on resources -pr: none - -resources: - pipelines: - - pipeline: CI - source: MessagePack-CSharp-CI - trigger: - tags: - - auto-release - -variables: -- group: Publishing secrets - -jobs: -- job: release - pool: - vmImage: ubuntu-latest - steps: - - checkout: none - - powershell: | - Write-Host "##vso[build.updatebuildnumber]$(resources.pipeline.CI.runName)" - if ('$(resources.pipeline.CI.runName)'.Contains('-')) { - Write-Host "##vso[task.setvariable variable=IsPrerelease]true" - } else { - Write-Host "##vso[task.setvariable variable=IsPrerelease]false" - } - displayName: โš™ Set up pipeline - - task: UseDotNet@2 - displayName: โš™ Install .NET SDK - inputs: - packageType: sdk - version: 6.x - - download: CI - artifact: deployables-Windows - displayName: ๐Ÿ”ป Download deployables-Windows artifact - patterns: 'deployables-Windows/*' - - task: GitHubRelease@1 - displayName: ๐Ÿ“ข GitHub release (create) - inputs: - gitHubConnection: AArnott github - repositoryName: $(Build.Repository.Name) - target: $(resources.pipeline.CI.sourceCommit) - tagSource: userSpecifiedTag - tag: v$(resources.pipeline.CI.runName) - title: v$(resources.pipeline.CI.runName) - isDraft: true # After running this step, visit the new draft release, edit, and publish. - isPreRelease: $(IsPrerelease) - assets: | - $(Pipeline.Workspace)/CI/deployables-Windows/*.nupkg - $(Pipeline.Workspace)/CI/unity/*.unitypackage - changeLogCompareToRelease: lastNonDraftRelease - changeLogType: issueBased - changeLogLabels: | - [ - { "label" : "breaking change", "displayName" : "Breaking changes", "state" : "closed" }, - { "label" : "bug", "displayName" : "Fixes", "state" : "closed" }, - { "label" : "enhancement", "displayName": "Enhancements", "state" : "closed" } - ] - - script: dotnet nuget push $(Pipeline.Workspace)/CI/deployables-Windows/*.nupkg -s https://api.nuget.org/v3/index.json --api-key $(NuGetOrgApiKey) --skip-duplicate - displayName: ๐Ÿ“ฆ Push packages to nuget.org - condition: and(succeeded(), ne(variables['NuGetOrgApiKey'], '')) diff --git a/azure-pipelines/test.runsettings b/azure-pipelines/test.runsettings deleted file mode 100644 index 4e24a0a65..000000000 --- a/azure-pipelines/test.runsettings +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - \.dll$ - \.exe$ - - - xunit\..* - - - - - ^System\.Diagnostics\.DebuggerHiddenAttribute$ - ^System\.Diagnostics\.DebuggerNonUserCodeAttribute$ - ^System\.CodeDom\.Compiler\.GeneratedCodeAttribute$ - ^System\.Diagnostics\.CodeAnalysis\.ExcludeFromCodeCoverageAttribute$ - - - - - True - - True - - True - - False - - False - - False - - True - - - - - - diff --git a/azure-pipelines/variables/DotNetSdkVersion.ps1 b/azure-pipelines/variables/DotNetSdkVersion.ps1 deleted file mode 100644 index b213fbc27..000000000 --- a/azure-pipelines/variables/DotNetSdkVersion.ps1 +++ /dev/null @@ -1,2 +0,0 @@ -$globalJson = Get-Content -Path "$PSScriptRoot\..\..\global.json" | ConvertFrom-Json -$globalJson.sdk.version diff --git a/azure-pipelines/variables/_all.ps1 b/azure-pipelines/variables/_all.ps1 deleted file mode 100755 index cc6e88105..000000000 --- a/azure-pipelines/variables/_all.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env pwsh - -<# -.SYNOPSIS - This script returns a hashtable of build variables that should be set - at the start of a build or release definition's execution. -#> - -[CmdletBinding(SupportsShouldProcess = $true)] -param ( -) - -$vars = @{} - -Get-ChildItem "$PSScriptRoot\*.ps1" -Exclude "_*" |% { - Write-Host "Computing $($_.BaseName) variable" - $vars[$_.BaseName] = & $_ -} - -$vars diff --git a/azure-pipelines/variables/_pipelines.ps1 b/azure-pipelines/variables/_pipelines.ps1 deleted file mode 100644 index 11748b81b..000000000 --- a/azure-pipelines/variables/_pipelines.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -<# -.SYNOPSIS - This script translates the variables returned by the _all.ps1 script - into commands that instruct Azure Pipelines to actually set those variables for other pipeline tasks to consume. - - The build or release definition may have set these variables to override - what the build would do. So only set them if they have not already been set. -#> - -[CmdletBinding()] -param ( -) - -(& "$PSScriptRoot\_all.ps1").GetEnumerator() |% { - # Always use ALL CAPS for env var names since Azure Pipelines converts variable names to all caps and on non-Windows OS, env vars are case sensitive. - $keyCaps = $_.Key.ToUpper() - if ((Test-Path "env:$keyCaps") -and (Get-Content "env:$keyCaps")) { - Write-Host "Skipping setting $keyCaps because variable is already set to '$(Get-Content env:$keyCaps)'." -ForegroundColor Cyan - } else { - Write-Host "$keyCaps=$($_.Value)" -ForegroundColor Yellow - if ($env:TF_BUILD) { - # Create two variables: the first that can be used by its simple name and accessible only within this job. - Write-Host "##vso[task.setvariable variable=$keyCaps]$($_.Value)" - # and the second that works across jobs and stages but must be fully qualified when referenced. - Write-Host "##vso[task.setvariable variable=$keyCaps;isOutput=true]$($_.Value)" - } elseif ($env:GITHUB_ACTIONS) { - Add-Content -Path $env:GITHUB_ENV -Value "$keyCaps=$($_.Value)" - } - Set-Item -Path "env:$keyCaps" -Value $_.Value - } -} diff --git a/init.ps1 b/init.ps1 index e28498553..d5909d736 100755 --- a/init.ps1 +++ b/init.ps1 @@ -67,12 +67,6 @@ if (!$NoPrerequisites) { if ($LASTEXITCODE -eq 3010) { Exit 3010 } - - # The procdump tool and env var is required for dotnet test to collect hang/crash dumps of tests. - # But it only works on Windows. - if ($env:OS -eq 'Windows_NT') { - $EnvVars['PROCDUMP_PATH'] = & "$PSScriptRoot\azure-pipelines\Get-ProcDump.ps1" - } } # Workaround nuget credential provider bug that causes very unreliable package restores on Azure Pipelines diff --git a/tools/DotNetSdkVersion.ps1 b/tools/DotNetSdkVersion.ps1 new file mode 100644 index 000000000..41b89d7fd --- /dev/null +++ b/tools/DotNetSdkVersion.ps1 @@ -0,0 +1,2 @@ +$globalJson = Get-Content -Path "$PSScriptRoot\..\global.json" | ConvertFrom-Json +$globalJson.sdk.version diff --git a/azure-pipelines/Get-TempToolsPath.ps1 b/tools/Get-TempToolsPath.ps1 similarity index 100% rename from azure-pipelines/Get-TempToolsPath.ps1 rename to tools/Get-TempToolsPath.ps1 diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index 19617ab40..59849813b 100755 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -36,7 +36,7 @@ if (!(Test-Path $DotNetInstallScriptRoot)) { New-Item -ItemType Directory -Path $DotNetInstallScriptRoot = Resolve-Path $DotNetInstallScriptRoot # Look up actual required .NET SDK version from global.json -$sdkVersion = & "$PSScriptRoot/../azure-pipelines/variables/DotNetSdkVersion.ps1" +$sdkVersion = & "$PSScriptRoot/DotNetSdkVersion.ps1" If ($IncludeX86 -and ($IsMacOS -or $IsLinux)) { Write-Verbose "Ignoring -IncludeX86 switch because 32-bit runtimes are only supported on Windows." diff --git a/tools/Install-NuGetCredProvider.ps1 b/tools/Install-NuGetCredProvider.ps1 index 496049a29..1cd914d7e 100644 --- a/tools/Install-NuGetCredProvider.ps1 +++ b/tools/Install-NuGetCredProvider.ps1 @@ -21,7 +21,7 @@ Param ( $envVars = @{} -$toolsPath = & "$PSScriptRoot\..\azure-pipelines\Get-TempToolsPath.ps1" +$toolsPath = & "$PSScriptRoot\Get-TempToolsPath.ps1" if ($IsMacOS -or $IsLinux) { $installerScript = "installcredprovider.sh" diff --git a/tools/MergeFrom-Template.ps1 b/tools/MergeFrom-Template.ps1 deleted file mode 100644 index 3f721c6ac..000000000 --- a/tools/MergeFrom-Template.ps1 +++ /dev/null @@ -1,79 +0,0 @@ - -<# -.SYNOPSIS - Merges the latest changes from Library.Template into HEAD of this repo. -.PARAMETER LocalBranch - The name of the local branch to create at HEAD and use to merge into from Library.Template. -#> -[CmdletBinding(SupportsShouldProcess = $true)] -Param( - [string]$LocalBranch = "dev/$($env:USERNAME)/libtemplateUpdate" -) - -Function Spawn-Tool($command, $commandArgs, $workingDirectory, $allowFailures) { - if ($workingDirectory) { - Push-Location $workingDirectory - } - try { - if ($env:TF_BUILD) { - Write-Host "$pwd >" - Write-Host "##[command]$command $commandArgs" - } - else { - Write-Host "$command $commandArgs" -ForegroundColor Yellow - } - if ($commandArgs) { - & $command @commandArgs - } else { - Invoke-Expression $command - } - if ((!$allowFailures) -and ($LASTEXITCODE -ne 0)) { exit $LASTEXITCODE } - } - finally { - if ($workingDirectory) { - Pop-Location - } - } -} - -$remoteBranch = & $PSScriptRoot\..\azure-pipelines\Get-LibTemplateBasis.ps1 -ErrorIfNotRelated -if ($LASTEXITCODE -ne 0) { - exit $LASTEXITCODE -} - -$LibTemplateUrl = 'https://github.com/aarnott/Library.Template' -Spawn-Tool 'git' ('fetch', $LibTemplateUrl, $remoteBranch) -$SourceCommit = Spawn-Tool 'git' ('rev-parse', 'FETCH_HEAD') -$BaseBranch = Spawn-Tool 'git' ('branch', '--show-current') -$SourceCommitUrl = "$LibTemplateUrl/commit/$SourceCommit" - -# To reduce the odds of merge conflicts at this stage, we always move HEAD to the last successful merge. -$basis = Spawn-Tool 'git' ('rev-parse', 'HEAD') # TODO: consider improving this later - -Write-Host "Merging the $remoteBranch branch of Library.Template ($SourceCommit) into local repo $basis" -ForegroundColor Green - -Spawn-Tool 'git' ('checkout', '-b', $LocalBranch, $basis) $null $true -if ($LASTEXITCODE -eq 128) { - Spawn-Tool 'git' ('checkout', $LocalBranch) - Spawn-Tool 'git' ('merge', $basis) -} - -Spawn-Tool 'git' ('merge', 'FETCH_HEAD', '--no-ff', '-m', "Merge the $remoteBranch branch from $LibTemplateUrl`n`nSpecifically, this merges [$SourceCommit from that repo]($SourceCommitUrl).") -if ($LASTEXITCODE -eq 1) { - Write-Error "Merge conflict detected. Manual resolution required." - exit 1 -} -elseif ($LASTEXITCODE -ne 0) { - Write-Error "Merge failed with exit code $LASTEXITCODE." - exit $LASTEXITCODE -} - -$result = New-Object PSObject -Property @{ - BaseBranch = $BaseBranch # The original branch that was checked out when the script ran. - LocalBranch = $LocalBranch # The name of the local branch that was created before the merge. - SourceCommit = $SourceCommit # The commit from Library.Template that was merged in. - SourceBranch = $remoteBranch # The branch from Library.Template that was merged in. -} - -Write-Host $result -Write-Output $result From e57a42f6604731826b4f8ebf18eebe3632548d4f Mon Sep 17 00:00:00 2001 From: neuecc Date: Mon, 9 Dec 2024 18:15:02 +0900 Subject: [PATCH 6/7] avoid package update in Source Generator(AnalyzerProject) --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 888cb4a46..5226cce82 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -61,7 +61,7 @@ - + From 9bb199934712cc2b16de0149386735e677e0485f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 09:31:29 +0000 Subject: [PATCH 7/7] feat: Update package.json to 3.0.301 Commit by [GitHub Actions](https://github.com/MessagePack-CSharp/MessagePack-CSharp/actions/runs/12232722029) --- .../Assets/Scripts/MessagePack/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/package.json b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/package.json index 71b45cf2e..e01d2852c 100644 --- a/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/package.json +++ b/src/MessagePack.UnityClient/Assets/Scripts/MessagePack/package.json @@ -1,7 +1,7 @@ { "name": "com.github.messagepack-csharp", "displayName": "MessagePack", - "version": "3.0.300", + "version": "3.0.301", "unity": "2021.3", "description": "Extremely Fast MessagePack Serializer for C#.", "keywords": [