File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -360,14 +360,24 @@ function Find-UnitySetupInstaller {
360
360
}
361
361
362
362
# Every release type has a different pattern for finding installers
363
- $searchPages = @ ( " https://unity3d.com/get-unity/download/archive " , " https://unity3d.com/unity/beta/unity $Version " )
363
+ $searchPages = @ ()
364
364
switch ($Version.Release ) {
365
+ ' a' { $searchPages += " https://unity3d.com/unity/beta/unity$Version " }
366
+ ' b' { $searchPages += " https://unity3d.com/unity/beta/unity$Version " }
367
+ ' f' {
368
+ $searchPages += " https://unity3d.com/get-unity/download/archive"
369
+
370
+ # Just in case it's a release candidate search the beta as well.
371
+ if ($Version.Revision -eq ' 0' ) {
372
+ $searchPages += " https://unity3d.com/unity/beta/unity$Version "
373
+ }
374
+ }
365
375
' p' {
366
376
$patchPage = " https://unity3d.com/unity/qa/patch-releases?version=$ ( $Version.Major ) .$ ( $Version.Minor ) "
367
377
$searchPages += $patchPage
368
378
369
- $webResult = Invoke-WebRequest $patchPage - UseBasicParsing
370
- $searchPages += $webResult.Links | Where-Object {
379
+ $webResult = Invoke-WebRequest $patchPage - UseBasicParsing
380
+ $searchPages += $webResult.Links | Where-Object {
371
381
$_.href -match " \/unity\/qa\/patch-releases\?version=$ ( $Version.Major ) \.$ ( $Version.Minor ) &page=(\d+)" -and $Matches [1 ] -gt 1
372
382
} | ForEach-Object { " https://unity3d.com$ ( $_.href ) " }
373
383
}
You can’t perform that action at this time.
0 commit comments