Skip to content

Commit d183d88

Browse files
committed
Add debug output
1 parent 8d23773 commit d183d88

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

Source/Private/CopyReadMe.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function CopyReadMe {
2323
)
2424
process {
2525
# Copy the readme file as an about_ help file
26-
Write-Verbose "Test for ReadMe: $Pwd\$($ReadMe)"
26+
Write-Verbose "Test for ReadMe: $Pwd/$($ReadMe)"
2727
if ($ReadMe -and (Test-Path $ReadMe -PathType Leaf)) {
2828
# Make sure there's a language path
2929
$LanguagePath = Join-Path $OutputDirectory $Culture

Source/Private/GetBuildInfo.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function GetBuildInfo {
8383
}
8484

8585
if ((-not $BuildInfo.SourcePath) -and $ParameterValues["SourcePath"] -notmatch '\.psd1') {
86-
Write-Debug " Searching: SourcePath ($BuildManifestParent\**\*.psd1)"
86+
Write-Debug " Searching: SourcePath ($BuildManifestParent/**/*.psd1)"
8787
# Find a module manifest (or maybe several)
8888
$ModuleInfo = Get-ChildItem $BuildManifestParent -Recurse -Filter *.psd1 -ErrorAction SilentlyContinue |
8989
ImportModuleManifest -ErrorAction SilentlyContinue

Source/Public/Build-Module.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ function Build-Module {
5454
[Alias("ModuleManifest", "Path")]
5555
[string]$SourcePath = $(Get-Location -PSProvider FileSystem),
5656

57-
# Where to build the module. Defaults to "..\Output" adjacent to the "SourcePath" folder.
57+
# Where to build the module. Defaults to "../Output" adjacent to the "SourcePath" folder.
5858
# The ACTUAL output may be in a subfolder of this path ending with the module name and version
59-
# The default value is ..\Output which results in the build going to ..\Output\ModuleName\1.2.3
59+
# The default value is ../Output which results in the build going to ../Output/ModuleName/1.2.3
6060
[Alias("Destination")]
61-
[string]$OutputDirectory = "..\Output",
61+
[string]$OutputDirectory = "../Output",
6262

6363
# DEPRECATED. Now defaults true, producing a OutputDirectory with a version number as the last folder
6464
[switch]$VersionedOutputDirectory = $true,
@@ -101,7 +101,7 @@ function Build-Module {
101101

102102
# A Filter (relative to the module folder) for public functions
103103
# If non-empty, FunctionsToExport will be set with the file BaseNames of matching files
104-
# Defaults to Public\*.ps1
104+
# Defaults to Public/*.ps1
105105
[AllowEmptyString()]
106106
[string[]]$PublicFilter = "[Pp]ublic/*.ps1",
107107

@@ -135,7 +135,7 @@ function Build-Module {
135135
# - Build builds the module output
136136
# - CleanBuild first deletes the build output folder and then builds the module back into it
137137
# Note that the folder to be deleted is the actual calculated output folder, with the version number
138-
# So for the default OutputDirectory with version 1.2.3, the path to clean is: ..\Output\ModuleName\1.2.3
138+
# So for the default OutputDirectory with version 1.2.3, the path to clean is: ../Output/ModuleName/1.2.3
139139
[ValidateSet("Clean", "Build", "CleanBuild")]
140140
[string]$Target = "CleanBuild",
141141

@@ -205,9 +205,11 @@ function Build-Module {
205205
Write-Verbose "Combine scripts to $RootModule"
206206

207207
# SilentlyContinue because there don't *HAVE* to be functions at all
208+
Write-Debug " SourceDirectories: $($ModuleInfo.ModuleBase) + $($ModuleInfo.SourceDirectories -join '|')"
208209
$AllScripts = @($ModuleInfo.SourceDirectories).ForEach{
209210
# By explicitly converting, we support wildcards in the SourceDirectories parameter
210211
if ($SourceDirectory = Join-Path -Path $ModuleInfo.ModuleBase -ChildPath $_ | Convert-Path -ErrorAction SilentlyContinue) {
212+
Write-Debug " SourceDirectory: $SourceDirectory"
211213
Get-ChildItem -Path $SourceDirectory -Filter *.ps1 -Recurse -ErrorAction SilentlyContinue |
212214
Sort-Object -Property 'FullName'
213215
}

build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ try {
3737

3838
# Build new output
3939
$ParameterString = $PSBoundParameters.GetEnumerator().ForEach{ '-' + $_.Key + " '" + $_.Value + "'" } -join " "
40-
Write-Verbose "Build-Module Source\build.psd1 $($ParameterString) -Target CleanBuild"
41-
ModuleBuilderBootstrap\Build-Module -SourcePath Source\build.psd1 @PSBoundParameters -Target CleanBuild -Passthru -OutVariable BuildOutput | Split-Path
40+
Write-Verbose "Build-Module Source/build.psd1 $($ParameterString) -Target CleanBuild"
41+
ModuleBuilderBootstrap\Build-Module -SourcePath Source/build.psd1 @PSBoundParameters -Target CleanBuild -Passthru -OutVariable BuildOutput | Split-Path
4242
Write-Verbose "Module build output in $(Split-Path $BuildOutput.Path)"
4343

4444
# Clean up environment

0 commit comments

Comments
 (0)