@@ -38,8 +38,15 @@ Describe "Module Validation Tests" {
38
38
$masterform = (Invoke-WebRequest https:// raw.githubusercontent.com / TheJumpCloud/ jumpcloud- ADMU/ master/ jumpcloud- ADMU/ Powershell/ Form.ps1 - useBasicParsing).tostring()
39
39
$masterVersion = Select-String - inputobject:($masterform ) - Pattern:($VersionRegex )
40
40
$masterformversion = [version ]$masterversion.Matches.value
41
- $branchformversion | Should - BeGreaterThan $masterformversion
42
- $branchformversion .$ ($env: ModuleVersionType ) | Should - Be ($masterformversion .$ ($env: ModuleVersionType ) + 1 )
41
+ if ($env: ModuleVersionType -eq " manual" ){
42
+ # Manual Versioning
43
+ # Given version should be greater than master
44
+ $branchformversion | Should - BeGreaterThan $masterformversion
45
+ } else {
46
+ $branchformversion | Should - BeGreaterThan $masterformversion
47
+ $branchformversion .$ ($env: ModuleVersionType ) | Should - Be ($masterformversion .$ ($env: ModuleVersionType ) + 1 )
48
+ }
49
+
43
50
}
44
51
45
52
It ' Start-Migration version' {
@@ -50,8 +57,12 @@ Describe "Module Validation Tests" {
50
57
$masterStartMigration = (Invoke-WebRequest https:// raw.githubusercontent.com / TheJumpCloud/ jumpcloud- ADMU/ master/ jumpcloud- ADMU/ Powershell/ Start-Migration.ps1 - useBasicParsing).tostring()
51
58
$masterVersion = Select-String - inputobject:($masterStartMigration ) - Pattern:($VersionRegex )
52
59
$masterStartMigrationVersion = [version ]$masterVersion.Matches.value
53
- $branchStartMigrationVersion | Should - BeGreaterThan $masterStartMigrationVersion
54
- $branchStartMigrationVersion .$ ($env: ModuleVersionType ) | Should - Be ($masterStartMigrationVersion .$ ($env: ModuleVersionType ) + 1 )
60
+ if ($env: ModuleVersionType -eq " manual" ) {
61
+ $branchStartMigrationVersion | Should - BeGreaterThan $masterStartMigrationVersion
62
+ } else {
63
+ $branchStartMigrationVersion | Should - BeGreaterThan $masterStartMigrationVersion
64
+ $branchStartMigrationVersion .$ ($env: ModuleVersionType ) | Should - Be ($masterStartMigrationVersion .$ ($env: ModuleVersionType ) + 1 )
65
+ }
55
66
}
56
67
57
68
It ' gui_jcadmu.exe version' - skip {
@@ -60,8 +71,12 @@ Describe "Module Validation Tests" {
60
71
$masterVersion = Select-String - inputobject:($masterform ) - Pattern:($VersionRegex )
61
72
$masterformversion = [version ]$masterversion.Matches.value
62
73
$exeversion = [version ](Get-Item (" $PSScriptRoot \..\..\exe\gui_jcadmu.exe" )).VersionInfo.FileVersion
63
- $exeversion | Should - BeGreaterThan $masterformversion
64
- $exeversion .$ ($env: ModuleVersionType ) | Should - Be ($masterformversion .$ ($env: ModuleVersionType ) + 1 )
74
+ if ($env: ModuleVersionType -eq " manual" ) {
75
+ $exeversion | Should - BeGreaterThan $masterformversion
76
+ } else {
77
+ $exeversion | Should - BeGreaterThan $masterformversion
78
+ $exeversion .$ ($env: ModuleVersionType ) | Should - Be ($masterformversion .$ ($env: ModuleVersionType ) + 1 )
79
+ }
65
80
}
66
81
}
67
82
0 commit comments