Skip to content

Commit

Permalink
don't check links
Browse files Browse the repository at this point in the history
  • Loading branch information
tunisiano187 committed Apr 17, 2024
1 parent c72a8b6 commit 84eb72d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions scripts/Get-Package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,6 @@ if(Test-Path "$workfolder\README.md") {
$ReadmeContent = $ReadmeContent -replace "pkgid",$packageName.ToLower()
$ReadmeContent = $ReadmeContent -replace "PKGTITLE",$WorkContentNuspec.package.metadata.title
$ReadmeContent = $ReadmeContent -replace "PKGDesc",$WorkContentNuspec.package.metadata.description
$pattern = 'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+'
$linksfrom = [regex]::Matches($ReadmeContent, $pattern) | ForEach-Object { $_.Value }
foreach ($link in $linksfrom) {
$ReadmeContent = $ReadmeContent -replace $link,$(Get-RedirectedUrl $link -ErrorAction Continue).AbsoluteUri
}

Set-Content -Path "$PackageFolder\README.md" -Value $ReadmeContent
}
Expand Down

0 comments on commit 84eb72d

Please sign in to comment.