fixing output clean and making build init vars verbose output
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
task Clean {
|
||||
'Cleaning Output files...'
|
||||
$null = Get-ChildItem -Path $Output -File -Recurse |
|
||||
Remove-Item -Force -ErrorAction 'Ignore'
|
||||
if (Test-Path $Output)
|
||||
{
|
||||
"Cleaning Output files in [$Output]..."
|
||||
$null = Get-ChildItem -Path $Output -File -Recurse |
|
||||
Remove-Item -Force -ErrorAction 'Ignore'
|
||||
|
||||
'Cleaning Output directories...'
|
||||
$null = Get-ChildItem -Path $Output -Directory -Recurse |
|
||||
Remove-Item -Recurse -Force -ErrorAction 'Ignore'
|
||||
"Cleaning Output directories in [$Output]..."
|
||||
$null = Get-ChildItem -Path $Output -Directory -Recurse |
|
||||
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'
|
||||
Write-Verbose " DocsPath [$DocsPath]"
|
||||
Write-Verbose " DocsPath [$DocsPath]" -Verbose
|
||||
|
||||
$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
|
||||
Write-Verbose " Source [$Source]"
|
||||
Write-Verbose " Source [$Source]" -Verbose
|
||||
|
||||
$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"
|
||||
Write-Verbose " ManifestPath [$ManifestPath]"
|
||||
Write-Verbose " ManifestPath [$ManifestPath]" -Verbose
|
||||
|
||||
$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'
|
||||
Write-Verbose " Folders [$Folders]"
|
||||
Write-Verbose " Folders [$Folders]" -Verbose
|
||||
|
||||
$Script:TestFile = "$BuildRoot\Output\TestResults_PS$PSVersion`_$TimeStamp.xml"
|
||||
Write-Verbose " TestFile [$TestFile]"
|
||||
Write-Verbose " TestFile [$TestFile]" -Verbose
|
||||
|
||||
$Script:PSRepository = 'PSGallery'
|
||||
Write-Verbose " PSRepository [$TestFile]"
|
||||
Write-Verbose " PSRepository [$TestFile]" -Verbose
|
||||
|
||||
function taskx($Name, $Parameters) { task $Name @Parameters -Source $MyInvocation }
|
||||
|
||||
Reference in New Issue
Block a user