From 6ae861adcafff71845d797b27b5c1b285b2aefcd Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Mon, 2 Oct 2023 18:23:32 -0700 Subject: [PATCH] Update build script to always include the `ProjectUri` info --- PSReadLine.build.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PSReadLine.build.ps1 b/PSReadLine.build.ps1 index 7cb98f2da..366ca4940 100644 --- a/PSReadLine.build.ps1 +++ b/PSReadLine.build.ps1 @@ -165,10 +165,14 @@ task LayoutModule BuildPolyfiller, BuildMainModule, { if ($matches[1] -ne $version) { throw "AssemblyFileVersion mismatch with AssemblyInformationalVersion" } $prerelease = $matches[2] - # Put the prerelease tag in private data - $moduleManifestContent = [regex]::Replace($moduleManifestContent, "}", "PrivateData = @{ PSData = @{ Prerelease = '$prerelease'; ProjectUri = 'https://github.com/PowerShell/PSReadLine' } }$([System.Environment]::Newline)}") + # Put the prerelease tag in private data, along with the project URI. + $privateDataSection = "PrivateData = @{ PSData = @{ Prerelease = '$prerelease'; ProjectUri = 'https://github.com/PowerShell/PSReadLine' } }" + } else { + # Put the project URI in private data. + $privateDataSection = "PrivateData = @{ PSData = @{ ProjectUri = 'https://github.com/PowerShell/PSReadLine' } }" } + $moduleManifestContent = [regex]::Replace($moduleManifestContent, "}", "${privateDataSection}$([System.Environment]::Newline)}") $moduleManifestContent = [regex]::Replace($moduleManifestContent, "ModuleVersion = '.*'", "ModuleVersion = '$version'") $moduleManifestContent | Set-Content -Path $targetDir/PSReadLine.psd1