diff --git a/SitecoreShipFunctions.psd1 b/SitecoreShipFunctions.psd1 index b3c763b..2feaeb9 100644 --- a/SitecoreShipFunctions.psd1 +++ b/SitecoreShipFunctions.psd1 @@ -9,7 +9,7 @@ @{ # Version number of this module. -ModuleVersion = '1.2.02' +ModuleVersion = '1.2.03' # ID used to uniquely identify this module GUID = '1b83fbdb-f779-4cef-bbC5-b289a114eef4' @@ -21,7 +21,7 @@ Author = 'Patrick Perrone' CompanyName = 'Unknown' # Copyright statement for this module -Copyright = '(c) 2015 Patrick Perrone. All rights reserved.' +Copyright = '(c) 2017 Patrick Perrone. All rights reserved.' # Description of the functionality provided by this module Description = 'Make web requests to Sitecore.Ship API' diff --git a/SitecoreShipFunctions.psm1 b/SitecoreShipFunctions.psm1 index 1cbd882..57de166 100644 --- a/SitecoreShipFunctions.psm1 +++ b/SitecoreShipFunctions.psm1 @@ -168,9 +168,19 @@ function Get-SitecoreShipVersion { $webResponse = Invoke-SitecoreShipAboutRequest $HostName -Timeout $Timeout } + $bodyText = ($webResponse.ParsedHtml.getElementsByTagName("body") | select innerText).innerText [string]$versionText = $bodyText.Split("`r`n") | Select-String "Current release" - $versionNumber = $versionText.Trim().Split(" ") | Select-Object -Last 1 + if ($versionText) + { + $versionNumber = $versionText.Trim().Split(" ") | Select-Object -Last 1 + } + else + { + $bodyText = $bodyText.Split("-").Trim() | Select-Object -Last 1 + $versionNumber = $bodyText.Split(" ").Trim() | Select-Object -Last 1 + } + return $versionNumber } }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: