mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
fix conditions
This commit is contained in:
parent
8ef47e5ae2
commit
3957ff023f
1 changed files with 4 additions and 4 deletions
|
|
@ -32,22 +32,22 @@ steps:
|
|||
[bool]$CleanSourcesFolder = ${{parameters.CleanSourcesFolder}}
|
||||
[bool]$CleanPublishFolder = ${{parameters.CleanPublishFolder}}
|
||||
|
||||
if ($CleanArtifactsFolder -and Test-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
if ($CleanArtifactsFolder -and (Test-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY)) {
|
||||
Write-Host -ForegroundColor Cyan "Cleaning folder $env:BUILD_ARTIFACTSTAGINGDIRECTORY"
|
||||
Remove-Item -Path "$env:BUILD_ARTIFACTSTAGINGDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
if ($CleanBinariesFolder -and Test-Path $env:BUILD_BINARIESDIRECTORY) {
|
||||
if ($CleanBinariesFolder -and (Test-Path $env:BUILD_BINARIESDIRECTORY)) {
|
||||
Write-Host -ForegroundColor Cyan "Cleaning folder $env:BUILD_BINARIESDIRECTORY"
|
||||
Remove-Item -Path "$env:BUILD_BINARIESDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
if ($CleanSourcesFolder -and Test-Path $env:BUILD_SOURCESDIRECTORY) {
|
||||
if ($CleanSourcesFolder -and (Test-Path $env:BUILD_SOURCESDIRECTORY)) {
|
||||
Write-Host -ForegroundColor Cyan "Cleaning folder $env:BUILD_SOURCESDIRECTORY"
|
||||
Remove-Item -Path "$env:BUILD_SOURCESDIRECTORY\*" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
if ($CleanPublishFolder -and Test-Path $env:BUILD_PUBLISHDIRECTORY) {
|
||||
if ($CleanPublishFolder -and (Test-Path $env:BUILD_PUBLISHDIRECTORY)) {
|
||||
Write-Host -ForegroundColor Cyan "Cleaning folder $env:BUILD_PUBLISHDIRECTORY"
|
||||
Remove-Item -Path "$env:BUILD_PUBLISHDIRECTORY" -Filter '*.*' -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue