dotnet / dotnet/sourcelink

Conditionally run target only if EnableSourceLink=true

Open
#586 0 comments 1 reaction 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.