Skip to content

Commit 317ebe9

Browse files
added alpha to regex search
1 parent ae96311 commit 317ebe9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

UnitySetup/UnitySetup.psm1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class UnityVersion : System.IComparable {
162162
UnityVersion([string] $version) {
163163
$parts = $version.Split('-')
164164

165-
$parts[0] -match "(\d+)\.(\d+)\.(\d+)([fpb])(\d+)" | Out-Null
165+
$parts[0] -match "(\d+)\.(\d+)\.(\d+)([fpba])(\d+)" | Out-Null
166166
if ( $Matches.Count -ne 6 ) { throw "Invalid unity version: $version" }
167167
$this.Major = [int]($Matches[1]);
168168
$this.Minor = [int]($Matches[2]);
@@ -290,15 +290,15 @@ function Find-UnitySetupInstaller {
290290
$currentOS = Get-OperatingSystem
291291
switch ($currentOS) {
292292
([OperatingSystem]::Windows) {
293-
$unitySetupRegEx = "^(.+)\/([a-z0-9]+)\/Windows64EditorInstaller\/UnitySetup64-(\d+)\.(\d+)\.(\d+)([fpb])(\d+).exe$"
293+
$unitySetupRegEx = "^(.+)\/([a-z0-9]+)\/Windows64EditorInstaller\/UnitySetup64-(\d+)\.(\d+)\.(\d+)([fpba])(\d+).exe$"
294294
$targetSupport = "TargetSupportInstaller"
295295
$installerExtension = "exe"
296296
}
297297
([OperatingSystem]::Linux) {
298298
throw "Find-UnitySetupInstaller has not been implemented on the Linux platform. Contributions welcomed!";
299299
}
300300
([OperatingSystem]::Mac) {
301-
$unitySetupRegEx = "^(.+)\/([a-z0-9]+)\/MacEditorInstaller\/Unity-(\d+)\.(\d+)\.(\d+)([fpb])(\d+).pkg$"
301+
$unitySetupRegEx = "^(.+)\/([a-z0-9]+)\/MacEditorInstaller\/Unity-(\d+)\.(\d+)\.(\d+)([fpba])(\d+).pkg$"
302302
$targetSupport = "MacEditorTargetInstaller"
303303
$installerExtension = "pkg"
304304
}
@@ -399,7 +399,7 @@ function Find-UnitySetupInstaller {
399399
}
400400
else {
401401
# Regex needs to be reconfigured to parse builtin_shaders's url link
402-
$unitySetupRegEx = "^(.+)\/([a-z0-9]+)\/builtin_shaders-(\d+)\.(\d+)\.(\d+)([fpb])(\d+).zip$"
402+
$unitySetupRegEx = "^(.+)\/([a-z0-9]+)\/builtin_shaders-(\d+)\.(\d+)\.(\d+)([fpba])(\d+).zip$"
403403
}
404404
}
405405

0 commit comments

Comments
 (0)