Skip to content

Commit 35ed30b

Browse files
authored
Merge pull request #136 from KelvinTegelaar/master
[pull] master from KelvinTegelaar:master
2 parents 90eb183 + e07e70b commit 35ed30b

23 files changed

Lines changed: 49 additions & 42 deletions

.github/workflows/publish_release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,17 @@ jobs:
9595
env:
9696
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9797

98+
# Create version.json with version and commit hash
99+
- name: Create version.json
100+
run: |
101+
VERSION=$(cat version_latest.txt | tr -d '[:space:]')
102+
SHORT_SHA="${GITHUB_SHA::7}"
103+
echo "{\"version\": \"${VERSION}\", \"commit\": \"${SHORT_SHA}\"}" > version.json
104+
105+
- name: Build and stage modules
106+
shell: pwsh
107+
run: ./Tools/Build-DevApiModules.ps1
108+
98109
# Create ZIP File in a New Source Directory
99110
- name: Prepare and Zip Release Files
100111
if: env.tag_exists == 'false'

.github/workflows/upload_dev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
SHORT_SHA="${GITHUB_SHA::7}"
2626
echo "{\"version\": \"${VERSION}\", \"commit\": \"${SHORT_SHA}\"}" > version.json
2727
28+
- name: Build and stage modules
29+
shell: pwsh
30+
run: ./Tools/Build-DevApiModules.ps1
31+
2832
# Create ZIP File in a New Source Directory
2933
- name: Prepare and Zip Release Files
3034
run: |

Modules/CIPPCore/Public/GraphHelper/New-GraphGetRequest.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ function New-GraphGetRequest {
107107
} else {
108108
if ($Data.PSObject.Properties.Name -contains 'value') { $data.value } else { $Data }
109109
if ($noPagination -eq $true) {
110-
if ($Caller -eq 'Get-GraphRequestList') {
110+
if ($Caller -eq 'Get-GraphRequestList' -and $data.'@odata.nextLink') {
111111
@{ 'nextLink' = $data.'@odata.nextLink' }
112112
}
113113
$nextURL = $null

Modules/CIPPHTTP/Public/Entrypoints/HTTP Functions/CIPP/Core/Invoke-ListGraphRequest.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,13 @@ function Invoke-ListGraphRequest {
159159
if ($NextLink -and $Request.Query.TenantFilter -ne 'AllTenants') {
160160
Write-Host "NextLink: $NextLink"
161161
$Metadata['nextLink'] = $NextLink
162+
} else {
163+
$Metadata.Remove('nextLink')
162164
}
163-
# Remove nextLink trailing object only if its the last item
165+
# Remove nextLink trailing object only if it's the last item
164166
$Results = $Results | Where-Object { $_.PSObject.Properties.Name -notcontains 'nextLink' }
167+
} else {
168+
$Metadata.Remove('nextLink')
165169
}
166170
if ($Request.Query.ListProperties) {
167171
$Columns = ($Results | Select-Object -First 1).PSObject.Properties.Name
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'DNSHealth.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '1.1.5'
15+
ModuleVersion = '1.1.6'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,13 +1398,13 @@ function Read-MXRecord {
13981398
if ($Result.Status -eq 3) {
13991399
$ValidationFails.Add($NoMxValidation) | Out-Null
14001400
$MXResults.MailProvider = Get-Content "$($MyInvocation.MyCommand.Module.ModuleBase)\MailProviders\Null.json" | ConvertFrom-Json
1401-
$MXResults.Selectors = $MXRecords.MailProvider.Selectors
1401+
$MXResults.Selectors = $MXResults.MailProvider.Selectors
14021402
}
14031403

14041404
else {
14051405
$ValidationFails.Add($NoMxValidation) | Out-Null
14061406
$MXResults.MailProvider = Get-Content "$($MyInvocation.MyCommand.Module.ModuleBase)\MailProviders\Null.json" | ConvertFrom-Json
1407-
$MXResults.Selectors = $MXRecords.MailProvider.Selectors
1407+
$MXResults.Selectors = $MXResults.MailProvider.Selectors
14081408
}
14091409
$MXRecords = $null
14101410
}
@@ -1439,8 +1439,8 @@ function Read-MXRecord {
14391439
try { Get-Content $_ | ConvertFrom-Json -ErrorAction Stop }
14401440
catch { Write-Verbose $_.Exception.Message }
14411441
}
1442+
$ProviderMatched = $false
14421443
foreach ($Record in $MXRecords) {
1443-
$ProviderMatched = $false
14441444
foreach ($Provider in $ProviderList) {
14451445
try {
14461446
if ($Record.Hostname -match $Provider.MxMatch) {
@@ -1450,35 +1450,24 @@ function Read-MXRecord {
14501450
foreach ($Var in $Provider.SpfReplace) {
14511451
if ($ReservedVariables.Keys -contains $Var) {
14521452
$ReplaceList.Add($ReservedVariables.$Var) | Out-Null
1453-
}
1454-
1455-
else {
1453+
} else {
14561454
$ReplaceList.Add($Matches.$Var) | Out-Null
14571455
}
14581456
}
1459-
1460-
else {
1461-
$ReplaceList.Add($Matches.$Var) | Out-Null
1462-
}
14631457
}
14641458

14651459
$ExpectedInclude = $Provider.SpfInclude -f ($ReplaceList -join ', ')
1460+
# Set ExpectedInclude and Selector fields based on provider details
1461+
$MXResults.ExpectedInclude = $ExpectedInclude
1462+
$MXResults.Selectors = $Provider.Selectors
1463+
$ProviderMatched = $true
1464+
break
14661465
}
1467-
1468-
else {
1469-
$ExpectedInclude = $Provider.SpfInclude
1470-
}
1471-
1472-
# Set ExpectedInclude and Selector fields based on provider details
1473-
$MXResults.ExpectedInclude = $ExpectedInclude
1474-
$MXResults.Selectors = $Provider.Selectors
1475-
$ProviderMatched = $true
1476-
break
14771466
} catch { Write-Verbose $_.Exception.Message }
14781467
}
1479-
}
1480-
if ($ProviderMatched) {
1481-
break
1468+
if ($ProviderMatched) {
1469+
break
1470+
}
14821471
}
14831472
}
14841473
}
@@ -1489,7 +1478,7 @@ function Read-MXRecord {
14891478
$MXResults.Records = @($MXResults.Records)
14901479
$MXResults
14911480
}
1492-
#EndRegion './Public/Records/Read-MXRecord.ps1' 155
1481+
#EndRegion './Public/Records/Read-MXRecord.ps1' 144
14931482
#Region './Public/Records/Read-NSRecord.ps1' -1
14941483

14951484
function Read-NSRecord {
File renamed without changes.

Modules/DNSHealth/1.1.5/MailProviders/BarracudaESS.json renamed to Modules/DNSHealth/1.1.6/MailProviders/BarracudaESS.json

File renamed without changes.
File renamed without changes.

Modules/DNSHealth/1.1.5/MailProviders/HornetSecurity.json renamed to Modules/DNSHealth/1.1.6/MailProviders/HornetSecurity.json

File renamed without changes.

0 commit comments

Comments
 (0)