-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement fan-out behavior for publish.
Contributes to #22.
- Loading branch information
Showing
4 changed files
with
43 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,38 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<_RealOrFanOutPublish>_InnerPublish</_RealOrFanOutPublish> | ||
<_RealOrFanOutPublish Condition="'$(_RidFanOut)' == 'true'">_FanOutPublish</_RealOrFanOutPublish> | ||
</PropertyGroup> | ||
|
||
<Target Name="Publish" | ||
DependsOnTargets="$(_RealOrFanOutPublish)" | ||
Condition="'$(_InvalidConfigurationWarning)' != 'true'" /> | ||
|
||
<Target Name="_FanOutPublish"> | ||
<ItemGroup> | ||
<_RuntimeIdentifiers Include="$(RuntimeIdentifiers)" /> | ||
<_InnerProjects Include="$(MSBuildProjectFullPath)" | ||
Properties="RuntimeIdentifier=%(_RuntimeIdentifiers.Identity)" /> | ||
</ItemGroup> | ||
|
||
<MSBuild Projects="@(_InnerProjects)" | ||
Targets="_InnerPublish" | ||
BuildInParallel="$(BuildInParallel)" /> | ||
</Target> | ||
|
||
<!-- | ||
Unfortunately, the publish logic in the .NET SDK is not factored as well as | ||
the build and clean logic in MSBuild, so we have to duplicate some of the | ||
logic in the default Publish target here. | ||
--> | ||
<Target Name="_InnerPublish" | ||
DependsOnTargets="_PublishBuildAlternative; _PublishNoBuildAlternative"> | ||
<Message Text="$(MSBuildProjectName) -> $([System.IO.Path]::GetFullPath('$(PublishDir)'))" | ||
Importance="high" /> | ||
|
||
<AllowEmptyTelemetry EventName="PublishProperties" | ||
EventData="PublishReadyToRun=$(PublishReadyToRun); PublishTrimmed=$(PublishTrimmed); PublishSingleFile=$(PublishSingleFile)" /> | ||
</Target> | ||
|
||
<!-- TODO: https://github.com/alexrp/zig-msbuild-sdk/issues/16 --> | ||
</Project> |