Conditionally run target only if EnableSourceLink=true
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 148
- PR merge metrics
- No merged PRs in 30d
Description
We have some docker steps that don't need to be cache broken on each commit (`.git/HEAD` always changes) so we disable Source Link for those steps.
However as we still need the SourceLink.GitHub package in the publish that follows (where we do have the git files copied over) the target loads anyway and reports a warning because we haven't copied over the necessary git files, yet.
Could we make this warning conditional on whether source link is enabled at all? @tmat
https://github.com/dotnet/sourcelink/blob/336c5b6d0f42e3c763f08b0f640677f2fd9474af/src/Microsoft.Build.Tasks.Git/build/Microsoft.Build.Tasks.Git.targets#L20
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.