richardszalay / helix-publishing-pipeline

Unified publishing for Sitecore Helix solutions that extends existing Visual Studio and command line workflows
MIT License
68 stars 18 forks source link

Allow external MatchSourceMetadataName #66

Closed luuksommers closed 5 years ago

luuksommers commented 5 years ago

I think the MatchSourceMetadataName should not be in there twice as I am unable to update the MatchSourceMetadataNeme from the HelixModuleMetadataPatterns like

<HelixModuleMetadataPatterns Include="Convention">
  <!-- Now available as ^(HelixModule.Namespace), ^(HelixModule.Layer), and ^(HelixModule.Module) -->
  <SourceMetadataName>FileName</SourceMetadataName>
  <Pattern>^(?'Company'.+)\.(?'Solution'.+)\.(?'Project'.+?)\.(?'Module'.+)$</Pattern>
</HelixModuleMetadataPatterns>

The task already defaults to Name so I guess this is not needed, or should I add a condition so the target also defaults to Name when it's empty?

richardszalay commented 5 years ago

That second one should have condition so that it only defaults only if it's not defined:

<MatchSourceMetadataName Condition="'$(MatchSourceMetadataName)' = ''">Name</MatchSourceMetadataName>

That way it can be overridden but has a logical default

luuksommers commented 5 years ago

I'll patch the pr

On Sat, Aug 17, 2019, 08:31 Richard Szalay notifications@github.com wrote:

Would probably be better to have it default only if it's not defined:

Name

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/richardszalay/helix-publishing-pipeline/pull/66?email_source=notifications&email_token=AAJBQH5J5RYZVPUILD5AQYTQE6LLFA5CNFSM4IMHTRGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QEVJY#issuecomment-522209959, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJBQH2WNDBJWDQS3ZULNF3QE6LLFANCNFSM4IMHTRGA .

luuksommers commented 5 years ago

Tested with the conditional and works as intended.

richardszalay commented 5 years ago

Included in the v1.5.5 release - thanks for the PR!