Skip to content

Commit 246a3d7

Browse files
authored
fix(ci.yml): force unity build version if no found
If there is no Unity installer present and no Unity version is provided then the process just fails, and for some reason there seems to be no found Unity version so let's force it to be the min supported Unity version.
1 parent b25ec1b commit 246a3d7

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

templates/steps/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@ steps:
2020
{
2121
If (!$setupInstance)
2222
{
23-
Write-Error "No Unity version specified and no Unity installation found."
24-
Exit 1
23+
Write-Host "No Unity version specified and no Unity installation found - forcing to min supported version of 2018.3.10f1"
24+
$version = '2018.3.10f1';
25+
}
26+
Else
27+
{
28+
Write-Host "Using already installed Unity version '$($setupInstance.Version)'."
2529
}
26-
27-
Write-Host "Using already installed Unity version '$($setupInstance.Version)'."
2830
}
29-
ElseIf ($setupInstance.Version.ToString() -ne $version)
31+
32+
If ($setupInstance.Version.ToString() -ne $version)
3033
{
3134
Write-Host "Installing Unity version '$version'."
3235
Install-UnitySetupInstance -Installers (Find-UnitySetupInstaller -Version $version -Components "Windows")

0 commit comments

Comments
 (0)