Skip to content

Commit 5f9e6e8

Browse files
authored
Update build script to always include the ProjectUri info (#3821)
1 parent 3c433c8 commit 5f9e6e8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

PSReadLine.build.ps1

+6-2
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,14 @@ task LayoutModule BuildPolyfiller, BuildMainModule, {
165165
if ($matches[1] -ne $version) { throw "AssemblyFileVersion mismatch with AssemblyInformationalVersion" }
166166
$prerelease = $matches[2]
167167

168-
# Put the prerelease tag in private data
169-
$moduleManifestContent = [regex]::Replace($moduleManifestContent, "}", "PrivateData = @{ PSData = @{ Prerelease = '$prerelease'; ProjectUri = 'https://github.com/PowerShell/PSReadLine' } }$([System.Environment]::Newline)}")
168+
# Put the prerelease tag in private data, along with the project URI.
169+
$privateDataSection = "PrivateData = @{ PSData = @{ Prerelease = '$prerelease'; ProjectUri = 'https://github.com/PowerShell/PSReadLine' } }"
170+
} else {
171+
# Put the project URI in private data.
172+
$privateDataSection = "PrivateData = @{ PSData = @{ ProjectUri = 'https://github.com/PowerShell/PSReadLine' } }"
170173
}
171174

175+
$moduleManifestContent = [regex]::Replace($moduleManifestContent, "}", "${privateDataSection}$([System.Environment]::Newline)}")
172176
$moduleManifestContent = [regex]::Replace($moduleManifestContent, "ModuleVersion = '.*'", "ModuleVersion = '$version'")
173177
$moduleManifestContent | Set-Content -Path $targetDir/PSReadLine.psd1
174178

0 commit comments

Comments
 (0)