fixing output clean and making build init vars verbose output
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
task Clean {
|
task Clean {
|
||||||
'Cleaning Output files...'
|
if (Test-Path $Output)
|
||||||
|
{
|
||||||
|
"Cleaning Output files in [$Output]..."
|
||||||
$null = Get-ChildItem -Path $Output -File -Recurse |
|
$null = Get-ChildItem -Path $Output -File -Recurse |
|
||||||
Remove-Item -Force -ErrorAction 'Ignore'
|
Remove-Item -Force -ErrorAction 'Ignore'
|
||||||
|
|
||||||
'Cleaning Output directories...'
|
"Cleaning Output directories in [$Output]..."
|
||||||
$null = Get-ChildItem -Path $Output -Directory -Recurse |
|
$null = Get-ChildItem -Path $Output -Directory -Recurse |
|
||||||
Remove-Item -Recurse -Force -ErrorAction 'Ignore'
|
Remove-Item -Recurse -Force -ErrorAction 'Ignore'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,31 @@
|
|||||||
Write-Verbose "Initializing build variables"
|
Write-Verbose "Initializing build variables" -Verbose
|
||||||
|
Write-Verbose " Existing BuildRoot [$BuildRoot]" -Verbose
|
||||||
|
|
||||||
$Script:DocsPath = Join-Path -Path $BuildRoot -ChildPath 'Docs'
|
$Script:DocsPath = Join-Path -Path $BuildRoot -ChildPath 'Docs'
|
||||||
Write-Verbose " DocsPath [$DocsPath]"
|
Write-Verbose " DocsPath [$DocsPath]" -Verbose
|
||||||
|
|
||||||
$Script:Output = Join-Path -Path $BuildRoot -ChildPath 'Output'
|
$Script:Output = Join-Path -Path $BuildRoot -ChildPath 'Output'
|
||||||
Write-Verbose " Output [$Output]"
|
Write-Verbose " Output [$Output]" -Verbose
|
||||||
|
|
||||||
$Script:Source = Join-Path -Path $BuildRoot -ChildPath $ModuleName
|
$Script:Source = Join-Path -Path $BuildRoot -ChildPath $ModuleName
|
||||||
Write-Verbose " Source [$Source]"
|
Write-Verbose " Source [$Source]" -Verbose
|
||||||
|
|
||||||
$Script:Destination = Join-Path -Path $Output -ChildPath $ModuleName
|
$Script:Destination = Join-Path -Path $Output -ChildPath $ModuleName
|
||||||
Write-Verbose " Destination [$Destination]"
|
Write-Verbose " Destination [$Destination]" -Verbose
|
||||||
|
|
||||||
$Script:ManifestPath = Join-Path -Path $Destination -ChildPath "$ModuleName.psd1"
|
$Script:ManifestPath = Join-Path -Path $Destination -ChildPath "$ModuleName.psd1"
|
||||||
Write-Verbose " ManifestPath [$ManifestPath]"
|
Write-Verbose " ManifestPath [$ManifestPath]" -Verbose
|
||||||
|
|
||||||
$Script:ModulePath = Join-Path -Path $Destination -ChildPath "$ModuleName.psm1"
|
$Script:ModulePath = Join-Path -Path $Destination -ChildPath "$ModuleName.psm1"
|
||||||
Write-Verbose " ModulePath [$ModulePath]"
|
Write-Verbose " ModulePath [$ModulePath]" -Verbose
|
||||||
|
|
||||||
$Script:Folders = 'Classes', 'Includes', 'Internal', 'Private', 'Public', 'Resources'
|
$Script:Folders = 'Classes', 'Includes', 'Internal', 'Private', 'Public', 'Resources'
|
||||||
Write-Verbose " Folders [$Folders]"
|
Write-Verbose " Folders [$Folders]" -Verbose
|
||||||
|
|
||||||
$Script:TestFile = "$BuildRoot\Output\TestResults_PS$PSVersion`_$TimeStamp.xml"
|
$Script:TestFile = "$BuildRoot\Output\TestResults_PS$PSVersion`_$TimeStamp.xml"
|
||||||
Write-Verbose " TestFile [$TestFile]"
|
Write-Verbose " TestFile [$TestFile]" -Verbose
|
||||||
|
|
||||||
$Script:PSRepository = 'PSGallery'
|
$Script:PSRepository = 'PSGallery'
|
||||||
Write-Verbose " PSRepository [$TestFile]"
|
Write-Verbose " PSRepository [$TestFile]" -Verbose
|
||||||
|
|
||||||
function taskx($Name, $Parameters) { task $Name @Parameters -Source $MyInvocation }
|
function taskx($Name, $Parameters) { task $Name @Parameters -Source $MyInvocation }
|
||||||
|
|||||||
Reference in New Issue
Block a user