Skip to content

Instantly share code, notes, and snippets.

@dsolovay
Last active August 15, 2022 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsolovay/85f1ac6b96e0f817242e6fd11bb53ae9 to your computer and use it in GitHub Desktop.
Save dsolovay/85f1ac6b96e0f817242e6fd11bb53ae9 to your computer and use it in GitHub Desktop.
Download Sitecore release notes to hash table
function Get-SitecoreReleaseNotes()
{
$links = (invoke-webrequest https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform.aspx).Links
$versions = $links |? {$_.innerText -like 'Sitecore Experience Platform*' -and $_.InnerText -notlike '*and below*'} # https://www.howtogeek.com/124736/stupid-geek-tricks-extract-links-off-any-webpage-using-powershell/
$versionlinks = @{}
$versions |% { $versionLinks.Add($_.innerHtml, $_.href)}
$releaseNotes = @{}
$versionLinks.Keys |%{
$releaseNotesUrl = "https://dev.sitecore.net" + ($versionLinks[$_]).Trim(".aspx") + "/Release%20Notes"
Write-Verbose $releaseNotesUrl
$releaseNotes.Add($_, ((Invoke-WebRequest -uri $releaseNotesUrl).Content -replace '<[^>]+>','')) # https://stackoverflow.com/a/29930250/402949
write-verbose $releaseNotes[$_]
}
$releaseNotes
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment