-
Notifications
You must be signed in to change notification settings - Fork 546
[build] Copy templates to lowercase path on Linux #5873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Context: https://github.com/dotnet/sdk/issues/16946 Copy our template workload pack to a lowercase destination so that it can be detected and used when building and testing on Linux.
<Copy SourceFiles="@(_WLTemplates)" DestinationFolder="$(DotNetPreviewPath)template-packs" /> | ||
<!-- Copy template packs to lowercase destination when running on Linux --> | ||
<Copy Condition="'$(HostOS)' != 'Linux'" SourceFiles="@(_WLTemplates)" DestinationFolder="$(DotNetPreviewPath)template-packs" /> | ||
<Copy Condition="'$(HostOS)' == 'Linux'" SourceFiles="@(_WLTemplates)" DestinationFiles="@(_WLTemplates->'%(Filename)'->ToLower()->'$(DotNetPreviewPath)template-packs\%(Identity)')" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, we can always copy to a lowercase location. I am also hoping to wait for a response on the issue or to chat about this quickly on Thursday to see if we should change the template pack ID / version (here and in macios) instead. If there won't be SDK changes coming that will process the packs regardless of casing then we should probably make that change instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could someone explain that DestinationFiles
expression to me? I've never seen multiple ->
constructs before. Does the rightmost %(Identity)
apply to the "intermediate" list resulting from @(_WLTemplates->'%(Filename)'->ToLower())
, or is it %(_WLTemplates.Identity)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The %(Identity)
in this case will be the product of the transform plus the item function, so the value of
@(_WLTemplates->'%(Filename)'->ToLower())
best summarizes it.
Co-authored-by: WonYoung Choi <[email protected]>
Assuming this works everywhere I think we can merge it temporarily, or we can wait for a potential resolution to https://github.com/dotnet/sdk/issues/16946. |
Context: https://github.com/dotnet/sdk/issues/16946 Copy our template workload pack to a lowercase destination so that it can be detected and used when building and testing on Linux.
Context: https://github.com/dotnet/sdk/issues/16946
Copy our template workload pack to a lowercase destination so that it
can be detected and used when building and testing on Linux.