Merged PR 3438: LDX-825 add better module name handling
LDX-825 add better module name handling
This commit is contained in:
@@ -1,9 +1,27 @@
|
|||||||
|
Write-Verbose "Initializing build variables"
|
||||||
|
|
||||||
$Script:DocsPath = Join-Path -Path $BuildRoot -ChildPath 'Docs'
|
$Script:DocsPath = Join-Path -Path $BuildRoot -ChildPath 'Docs'
|
||||||
|
Write-Verbose " DocsPath [$DocsPath]"
|
||||||
|
|
||||||
$Script:Output = Join-Path -Path $BuildRoot -ChildPath 'Output'
|
$Script:Output = Join-Path -Path $BuildRoot -ChildPath 'Output'
|
||||||
|
Write-Verbose " Output [$Output]"
|
||||||
|
|
||||||
$Script:Source = Join-Path -Path $BuildRoot -ChildPath $ModuleName
|
$Script:Source = Join-Path -Path $BuildRoot -ChildPath $ModuleName
|
||||||
|
Write-Verbose " Source [$Source]"
|
||||||
|
|
||||||
$Script:Destination = Join-Path -Path $Output -ChildPath $ModuleName
|
$Script:Destination = Join-Path -Path $Output -ChildPath $ModuleName
|
||||||
|
Write-Verbose " Destination [$Destination]"
|
||||||
|
|
||||||
$Script:ManifestPath = Join-Path -Path $Destination -ChildPath "$ModuleName.psd1"
|
$Script:ManifestPath = Join-Path -Path $Destination -ChildPath "$ModuleName.psd1"
|
||||||
|
Write-Verbose " ManifestPath [$ManifestPath]"
|
||||||
|
|
||||||
$Script:ModulePath = Join-Path -Path $Destination -ChildPath "$ModuleName.psm1"
|
$Script:ModulePath = Join-Path -Path $Destination -ChildPath "$ModuleName.psm1"
|
||||||
|
Write-Verbose " ModulePath [$ModulePath]"
|
||||||
|
|
||||||
$Script:Folders = 'Classes', 'Includes', 'Internal', 'Private', 'Public', 'Resources'
|
$Script:Folders = 'Classes', 'Includes', 'Internal', 'Private', 'Public', 'Resources'
|
||||||
|
Write-Verbose " Folders [$Folders]"
|
||||||
|
|
||||||
$Script:TestFile = "$BuildRoot\Output\TestResults_PS$PSVersion`_$TimeStamp.xml"
|
$Script:TestFile = "$BuildRoot\Output\TestResults_PS$PSVersion`_$TimeStamp.xml"
|
||||||
|
Write-Verbose " TestFile [$TestFile]"
|
||||||
|
|
||||||
function taskx($Name, $Parameters) { task $Name @Parameters -Source $MyInvocation }
|
function taskx($Name, $Parameters) { task $Name @Parameters -Source $MyInvocation }
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
$Script:ModuleName = Split-Path -Leaf $PSScriptRoot
|
$Script:ModuleName = Get-ChildItem .\*\*.psm1 | Select-object -ExpandProperty BaseName
|
||||||
$Script:CodeCoveragePercent = 0.0 # 0 to 1
|
$Script:CodeCoveragePercent = 0.0 # 0 to 1
|
||||||
. $psscriptroot\BuildTasks\InvokeBuildInit.ps1
|
. $psscriptroot\BuildTasks\InvokeBuildInit.ps1
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
$Script:ModuleRoot = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent
|
$Script:ModuleRoot = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent
|
||||||
$Script:ModuleName = Split-Path -Path $ModuleRoot -Leaf
|
$Script:ModuleName = $Script:ModuleName = Get-ChildItem $ModuleRoot\*\*.psm1 | Select-object -ExpandProperty BaseName
|
||||||
|
|
||||||
Describe "Public commands have comment-based or external help" -Tags 'Build' {
|
Describe "Public commands have comment-based or external help" -Tags 'Build' {
|
||||||
$functions = Get-Command -Module $ModuleName
|
$functions = Get-Command -Module $ModuleName
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
$Script:ModuleRoot = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent
|
$Script:ModuleRoot = Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent
|
||||||
$Script:ModuleName = Split-Path -Path $ModuleRoot -Leaf
|
$Script:ModuleName = $Script:ModuleName = Get-ChildItem $ModuleRoot\*\*.psm1 | Select-object -ExpandProperty BaseName
|
||||||
|
|
||||||
$Script:SourceRoot = Join-Path -Path $ModuleRoot -ChildPath $ModuleName
|
$Script:SourceRoot = Join-Path -Path $ModuleRoot -ChildPath $ModuleName
|
||||||
|
|
||||||
Describe "All commands pass PSScriptAnalyzer rules" -Tag 'Build' {
|
Describe "All commands pass PSScriptAnalyzer rules" -Tag 'Build' {
|
||||||
|
|||||||
Reference in New Issue
Block a user