Skip to content

Commit a73e3ce

Browse files
committed
manual test
1 parent dc1d1f6 commit a73e3ce

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

ModuleChangelog.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
## 2.6.1
22

3-
Release Date: February 7, 2024
4-
5-
#### Bug Fixes:
6-
```
7-
* Fix issue with manual release type not included in build
8-
```
9-
## 2.6.0
10-
11-
Release Date: February 7, 2024
3+
Release Date: February 12, 2024
124

135
#### RELEASE NOTES
146

@@ -20,6 +12,7 @@ Release Date: February 7, 2024
2012
```
2113
* Addressed a issue where a registry hive fails to load, the tool will now halt migration instead of continuing
2214
* Fixed a bug with Module Changelog version test where release type number is not properly outputted
15+
* Fix issue with manual release type not included in tests
2316
```
2417
## 2.5.1
2518

jumpcloud-ADMU/Powershell/Tests/Build.Tests.ps1

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,15 @@ Describe "Module Validation Tests" {
3838
$masterform = (Invoke-WebRequest https://raw.githubusercontent.com/TheJumpCloud/jumpcloud-ADMU/master/jumpcloud-ADMU/Powershell/Form.ps1 -useBasicParsing).tostring()
3939
$masterVersion = Select-String -inputobject:($masterform) -Pattern:($VersionRegex)
4040
$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+
4350
}
4451

4552
It 'Start-Migration version' {
@@ -50,8 +57,12 @@ Describe "Module Validation Tests" {
5057
$masterStartMigration = (Invoke-WebRequest https://raw.githubusercontent.com/TheJumpCloud/jumpcloud-ADMU/master/jumpcloud-ADMU/Powershell/Start-Migration.ps1 -useBasicParsing).tostring()
5158
$masterVersion = Select-String -inputobject:($masterStartMigration) -Pattern:($VersionRegex)
5259
$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+
}
5566
}
5667

5768
It 'gui_jcadmu.exe version' -skip {
@@ -60,8 +71,12 @@ Describe "Module Validation Tests" {
6071
$masterVersion = Select-String -inputobject:($masterform) -Pattern:($VersionRegex)
6172
$masterformversion = [version]$masterversion.Matches.value
6273
$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+
}
6580
}
6681
}
6782

0 commit comments

Comments
 (0)