From 8ccf2799e1f08e8e6b87a0c344b35a5a51be89c8 Mon Sep 17 00:00:00 2001 From: jhoneill Date: Sun, 8 Dec 2019 23:30:20 +0000 Subject: [PATCH] go back to reading settings directly --- CI/PS-CI.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CI/PS-CI.ps1 b/CI/PS-CI.ps1 index 09e82d1..c3bbd4b 100644 --- a/CI/PS-CI.ps1 +++ b/CI/PS-CI.ps1 @@ -49,10 +49,10 @@ if (-not $psdpath -or $psdpath.count -gt 1) { throw "Did not find a unique PSD file " } else { - try {$settings = Test-ModuleManifest -Path $psdpath -ErrorAction stop} + try {$null = Test-ModuleManifest -Path $psdpath -ErrorAction stop} catch {throw $_ ; return} $ModuleName = $psdpath.Name -replace '\.psd1$' , '' - # $Settings = $(& ([scriptblock]::Create(($psdpath | Get-Content -Raw)))) + $Settings = $(& ([scriptblock]::Create(($psdpath | Get-Content -Raw)))) $approvedVerbs = Get-Verb | Select-Object -ExpandProperty verb $script:warningfile = Join-Path -Path $pwd -ChildPath "warnings.txt" } @@ -87,7 +87,7 @@ if (-not $SkipPreChecks) { $name = $file.name -replace(".ps1","") if ($name -notmatch ("(\w+)-\w+")) {Show-Warning "$name in the public folder is not a verb-noun name"} elseif ($Matches[1] -notin $approvedVerbs) {Show-Warning "$name in the public folder does not start with an approved verb"} - if(-not ($Settings.ExportedFunctions.Keys -ceq $name)) { + if(-not ($Settings.FunctionsToExport -ceq $name)) { Show-Warning ('File {0} in the public folder does not match an exported function in the manifest' -f $file.name) } else { @@ -104,7 +104,7 @@ if (-not $SkipPreChecks) { if ($m2.value -match "(?