mirror of
https://github.com/tribufu/ServerManagers
synced 2026-05-06 15:17:34 +00:00
adding true checks to if conditions
This commit is contained in:
parent
63ccf23f5f
commit
8f5e3aa92f
1 changed files with 4 additions and 4 deletions
|
|
@ -27,22 +27,22 @@ steps:
|
|||
inputs:
|
||||
targetType: inline
|
||||
script: |
|
||||
if (${{parameters.CleanArtifactsFolder}} -and Test-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||
if (${{parameters.CleanArtifactsFolder}} -eq $true -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 (${{parameters.CleanBinariesFolder}} -and Test-Path $env:BUILD_BINARIESDIRECTORY) {
|
||||
if (${{parameters.CleanBinariesFolder}} -eq $true -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 (${{parameters.CleanSourcesFolder}} -and Test-Path $env:BUILD_SOURCESDIRECTORY) {
|
||||
if (${{parameters.CleanSourcesFolder}} -eq $true -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 (${{parameters.CleanPublishFolder}} -and Test-Path $env:BUILD_PUBLISHDIRECTORY) {
|
||||
if (${{parameters.CleanPublishFolder}} -eq $true -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