Skip to content

Commit

Permalink
Fix warning conditions to only be emitted when feature is ON
Browse files Browse the repository at this point in the history
  • Loading branch information
safern committed Feb 26, 2019
1 parent b0fcfd9 commit ae6703b
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@

<PropertyGroup>
<HelixResultsDestinationDir Condition="'$(HelixResultsDestinationDir)' == '' AND '$(BUILD_SOURCESDIRECTORY)' != ''">$([MSBuild]::NormalizePath('$(BUILD_SOURCESDIRECTORY)', 'artifacts', helixresults'))</HelixResultsDestinationDir>

<_shouldDownloadResults>false</_shouldDownloadResults>
<_shouldDownloadResults Condition="'@(_workItemsWithDownloadMetadata)' != '' AND '$(HelixResultsDestinationDir)' != ''">true</_shouldDownloadResults>
</PropertyGroup>

<Warning Text="DownloadFromResultsContainer will be skipped for job %(SentJob.Identity) becaue results container uri is empty" Condition="'%(SentJob.ResultsContainerUri)' == ''" />
<Warning Text="DownloadFromResultsContainer will be skipped because HelixResultsDestinationDir is empty" Condition="'$(HelixResultsDestinationDir)' == ''" />
<Warning Text="DownloadFromResultsContainer will be skipped for job %(SentJob.Identity) becaue results container uri is empty" Condition="'%(SentJob.ResultsContainerUri)' == '' AND $(_shouldDownloadResults)" />

<DownloadFromResultsContainer
Condition="'@(_workItemsWithDownloadMetadata)' != '' AND '%(SentJob.ResultsContainerUri)' != '' AND '$(HelixResultsDestinationDir)' != ''"
Condition="$(_shouldDownloadResults) AND '%(SentJob.ResultsContainerUri)' != ''"
WorkItems="@(_workItemsWithDownloadMetadata)"
ResultsContainer="%(SentJob.ResultsContainerUri)"
OutputDirectory="$(HelixResultsDestinationDir)"
Expand Down

0 comments on commit ae6703b

Please sign in to comment.