Merge pull request #229 from cartwrightluke/patch-1

Added private build support
This commit is contained in:
Josh Wittner 2021-09-16 14:04:39 -07:00 коммит произвёл GitHub
Родитель 1397b0eaa4 e2a115f410
Коммит 54b4a1a876
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -344,6 +344,8 @@ function ConvertTo-UnitySetupComponent {
Finds UnitySetup component installers for a specified version by querying Unity's website.
.PARAMETER Version
What version of Unity are you looking for?
.PARAMETER Hash
Manually specify the build hash, to select a private build.
.PARAMETER Components
What components would you like to search for? Defaults to All
.EXAMPLE
@ -358,7 +360,10 @@ function Find-UnitySetupInstaller {
[UnityVersion] $Version,
[parameter(Mandatory = $false)]
[UnitySetupComponent] $Components = [UnitySetupComponent]::All
[UnitySetupComponent] $Components = [UnitySetupComponent]::All,
[parameter(Mandatory = $false)]
[string] $Hash = ""
)
$Components = ConvertTo-UnitySetupComponent -Component $Components -Version $Version
@ -514,6 +519,10 @@ function Find-UnitySetupInstaller {
$knownBaseUrls = $knownBaseUrls | Sort-Object -Property @{ Expression = { [math]::Abs(($_.CompareTo($linkComponents[0]))) }; Ascending = $true }
}
if ($Hash -ne "") {
$linkComponents[1] = $Hash
}
$installerTemplates.Keys | Where-Object { $Components -band $_ } | ForEach-Object {
$templates = $installerTemplates.Item($_);
$result = $null