@@ -13,35 +13,35 @@ Import-Module (Join-Path $PSScriptRoot "../builders/python-version.psm1")
13
13
14
14
BeforeAll {
15
15
function Analyze-MissingModules ([string ] $buildOutputLocation ) {
16
- $searchStringStart = " Failed to build these modules:"
17
- $searchStringEnd = " running build_scripts"
18
- $pattern = " $searchStringStart (.*?)$searchStringEnd "
19
-
20
- $buildContent = Get-Content - Path $buildOutputLocation
21
- $splitBuiltOutput = $buildContent -split " \n"
22
-
23
- # ## Search for missing modules that are displayed between the search strings
24
- $regexMatch = [regex ]::match($splitBuiltOutput , $pattern )
25
- if ($regexMatch.Success ) {
26
- $module = $regexMatch.Groups [1 ].Value.Trim()
27
- Write-Host " Failed missing modules:"
28
- Write-Host $module
29
- try {
30
- $semver = [semver ]" $ ( $Version.Major ) .$ ( $Version.Minor ) "
31
- } catch {
32
- Write-Error " Invalid Semantic Version format: $Version "
33
- return 1
34
- }
35
-
36
- if (($module -eq " _tkinter" ) -and ($semver -ge [semver ]" 3.10" ) -and $Version.PreReleaseLabel ) {
37
- Write-Host " $module $Version ignored"
38
- } else {
39
- return 1
40
- }
16
+ $searchStringStart = " Failed to build these modules:"
17
+ $searchStringEnd = " running build_scripts"
18
+ $pattern = " $searchStringStart (.*?)$searchStringEnd "
19
+
20
+ $buildContent = Get-Content - Path $buildOutputLocation
21
+ $splitBuiltOutput = $buildContent -split " \n"
22
+
23
+ # ## Search for missing modules that are displayed between the search strings
24
+ $regexMatch = [regex ]::match($splitBuiltOutput , $pattern )
25
+ if ($regexMatch.Success ) {
26
+ $module = $regexMatch.Groups [1 ].Value.Trim()
27
+ Write-Host " Failed missing modules:"
28
+ Write-Host $module
29
+ try {
30
+ $semver = [semver ]" $ ( $Version.Major ) .$ ( $Version.Minor ) "
31
+ } catch {
32
+ Write-Error " Invalid Semantic Version format: $Version "
33
+ return 1
41
34
}
42
35
43
- return 0
36
+ if (($module -eq " _tkinter" ) -and ($semver -ge [semver ]" 3.10" ) -and $Version.PreReleaseLabel ) {
37
+ Write-Host " $module $Version ignored"
38
+ } else {
39
+ return 1
40
+ }
44
41
}
42
+
43
+ return 0
44
+ }
45
45
}
46
46
47
47
Describe " Tests" {
0 commit comments