Skip to content

Commit

Permalink
Run MoveDotNetBuildLogs target even when the repo build fails (#44480)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer authored Oct 29, 2024
1 parent 99ee9c6 commit 1b67c37
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/SourceBuild/content/repo-projects/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -489,14 +489,14 @@
<Output TaskParameter="TouchedFiles" ItemName="FileWrites" />
</Touch>

<!-- Propagate errors to the output when using the minimal console log feature. -->
<OnError ExecuteTargets="LogRepoBuildError" Condition="'$(MinimalConsoleLogOutput)' == 'true'" />
<OnError ExecuteTargets="MoveDotNetBuildLogs;LogRepoBuildError" />
</Target>

<Target Name="LogRepoBuildError">
<Message Importance="High" Text="$([System.IO.File]::ReadAllText('$(RepoConsoleLogFile)'))" Condition="Exists('$(RepoConsoleLogFile)') and '$(MinimalConsoleLogOutput)' == 'true'" />
<!-- Propagate errors to the output when using the minimal console log feature. -->
<Target Name="LogRepoBuildError" Condition="'$(MinimalConsoleLogOutput)' == 'true'">
<Message Importance="High" Text="$([System.IO.File]::ReadAllText('$(RepoConsoleLogFile)'))" Condition="Exists('$(RepoConsoleLogFile)')" />
<Message Importance="High" Text="'$(RepositoryName)' failed during build." />
<Message Importance="High" Text="See '$(RepoConsoleLogFile)' for more information." Condition="Exists('$(RepoConsoleLogFile)') and '$(MinimalConsoleLogOutput)' == 'true'" />
<Message Importance="High" Text="See '$(RepoConsoleLogFile)' for more information." Condition="Exists('$(RepoConsoleLogFile)')" />
</Target>

<!-- Log the new repo artifacts -->
Expand Down

0 comments on commit 1b67c37

Please sign in to comment.