Update powershell script

This commit is contained in:
Joseph Donofry 2019-05-18 15:35:10 -04:00
parent 28e40544c4
commit 4d17c077e5
No known key found for this signature in database
GPG key ID: E8A1D78EF044B0CB

View file

@ -31,7 +31,9 @@ steps:
- bash: ls ${ARTIFACT_STAGING_DIRECTORY}
env:
ARTIFACT_STAGING_DIRECTORY: $(Build.ArtifactStagingDirectory))
- pwsh: if( (Get-ChildItem $(Build.ArtifactStagingDirectory) | Measure-Object).Count -eq 0) { echo '##vso[task.setvariable variable=buildSuccess]false' } else { echo '##vso[task.setvariable variable=buildSuccess]true' }
- pwsh: if( (Get-ChildItem $ENV:ARTIFACT_STAGING_DIRECTORY | Measure-Object).Count -eq 0) { echo '##vso[task.setvariable variable=buildSuccess]false' } else { echo '##vso[task.setvariable variable=buildSuccess]true' }
env:
ARTIFACT_STAGING_DIRECTORY: $(Build.ArtifactStagingDirectory))
# delete the release if it already exists to avoid an error
- task: GitHubRelease@0
condition: and(succeeded(), eq(variables['buildSuccess'], 'true') )