|
@@ -3,9 +3,10 @@
|
|
|
$branches = 'https://github.com/rightscale/rsc/branches/all'
|
|
|
|
|
|
function global:au_GetLatest {
|
|
|
- $download_page = Invoke-WebRequest -Uri $branches
|
|
|
- $regex = '^v\d+\.\d+\.\d+$'
|
|
|
- $branch = $download_page.Links | ? innerText -Match $regex | select -First 1 -ExpandProperty innerText
|
|
|
+ $download_page = Invoke-WebRequest -Uri $branches -UseBasicParsing
|
|
|
+ $regex = '^/rightscale/rsc/tree/(v\d+\.\d+\.\d+)$'
|
|
|
+ $tree = $download_page.Links | ? href -Match $regex | select -First 1 -ExpandProperty href
|
|
|
+ $branch = $tree -replace $regex, '$1'
|
|
|
$version = $branch.Substring(1)
|
|
|
$url64 = "https://binaries.rightscale.com/rsbin/rsc/$branch/rsc-windows-amd64.zip"
|
|
|
return @{ Version = $version; URL64 = $url64 }
|