Skip to content
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

feature multi publish #15

Open
carsten-riedel opened this issue Dec 9, 2023 · 0 comments
Open

feature multi publish #15

carsten-riedel opened this issue Dec 9, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@carsten-riedel
Copy link
Owner

exe net6.0;net7.0;net8.0 enable enable false embedded win-x86;win-x64;linux-x64;linux-musl-x64;linux-musl-arm64;linux-arm;linux-arm64;linux-bionic-arm64;osx-x64;ios-arm64;android-arm64 true false bin\Publish\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier) Debian-Ubuntu-CentOS-Fedora Alpine Docker RaspberryPiModel2 RaspberryPiModel3UbuntuServer Termux macOS ios Android Windows32bit Windows64bit $(RuntimeIdentifier) bin\Publish\$(Configuration)\$(TargetFramework)\$(RuntimeName)
<!-- Inline task to generate combinations -->
(); foreach (var rid in RuntimeIdentifiers) { foreach (var tf in TargetFrameworks) { string combination = $"RuntimeIdentifier={rid.ItemSpec};TargetFramework={tf.ItemSpec}"; combinations.Add(new Microsoft.Build.Utilities.TaskItem(combination)); } } Combinations = combinations.ToArray(); ]]>
<PropertyGroup>
  <RuntimeIdentifiersProperty Condition="'$(RuntimeIdentifier)' != ''">$(RuntimeIdentifier)</RuntimeIdentifiersProperty>
  <RuntimeIdentifiersProperty Condition="'$(RuntimeIdentifiers)' != ''">$(RuntimeIdentifiers)</RuntimeIdentifiersProperty>
  <TargetFrameworksProperty Condition="'$(TargetFramework)' != ''">$(TargetFramework)</TargetFrameworksProperty>
  <TargetFrameworksProperty Condition="'$(TargetFrameworks)' != ''">$(TargetFrameworks)</TargetFrameworksProperty>
</PropertyGroup>

<ItemGroup>
  <DefinedRuntimeIdentifier Include="$(RuntimeIdentifiersProperty.Split(';'))"/>
  <DefinedTargetFramework Include="$(TargetFrameworksProperty.Split(';'))"/>
</ItemGroup>


<GenerateCombinations RuntimeIdentifiers="@(DefinedRuntimeIdentifier)" TargetFrameworks="@(DefinedTargetFramework)">
  <Output TaskParameter="Combinations" ItemName="AllCombinations"/>
</GenerateCombinations>

<MSBuild Projects="$(MSBuildProjectFile)" Targets="Restore" Properties="DefaultTarget=true;RuntimeIdentifiers=$(RuntimeIdentifiersProperty);TargetFrameworks=$(TargetFrameworksProperty)" />
<MSBuild Projects="$(MSBuildProjectFile)" Targets="Clean;Build;Publish" Properties="DefaultTarget=true;%(AllCombinations.Identity)" />
@carsten-riedel carsten-riedel added the enhancement New feature or request label Dec 9, 2023
@carsten-riedel carsten-riedel self-assigned this Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant