Skip to content

Commit

Permalink
Make SourceBuild.props work on Windows
Browse files Browse the repository at this point in the history
Contributes to VMR work: dotnet/source-build#3926

Changes are from dotnet/dotnet#46
  • Loading branch information
ViktorHofer authored Jan 22, 2024
1 parent cc9cff3 commit d77955f
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions eng/SourceBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
<SourceBuildTargetFrameworkFilter>netstandard2.0%3bnetstandard2.1%3bnetcoreapp2.1%3bnetcoreapp3.1%3bnet5.0%3bnet6.0%3bnet7.0%3bnet8.0%3bnet9.0</SourceBuildTargetFrameworkFilter>
</PropertyGroup>

<!-- Only run this target in source-build only mode. -->
<Target Name="PrepareGlobalJsonForSourceBuild"
AfterTargets="PrepareInnerSourceBuildRepoRoot"
BeforeTargets="RunInnerSourceBuildCommand">
BeforeTargets="RunInnerSourceBuildCommand"
Condition="'$(ArcadeBuildFromSource)' == 'true'">
<Exec
Command="./eng/scripts/prepare-sourcebuild-globaljson.sh"
WorkingDirectory="$(InnerSourceBuildRepoRoot)" />
Expand All @@ -28,13 +30,11 @@
<Delete Files="$(InnerSourceBuildRepoRoot).globalconfig" />
</Target>

<!--
Build RepoTasks - this is normally triggered via the build script but the inner ArPow source-build is run via msbuild
-->
<!-- Build RepoTasks - this is normally triggered via the build script but the inner ArPow source-build is run via msbuild.
https://github.com/dotnet/source-build/issues/3807 -->
<Target Name="BuildRepoTasks"
Condition="'$(ArcadeInnerBuildFromSource)' == 'true'"
BeforeTargets="Execute">

<!-- If the alternative runtime location and key are present, pass those through -->
<PropertyGroup>
<_AdditionalRepoTaskBuildArgs />
Expand All @@ -45,7 +45,8 @@
<ItemGroup>
<!-- We need to flow FullAssemblySigningSupported even when building repo tasks because they use full signing -->
<InnerBuildEnv Condition="'$(FullAssemblySigningSupported)' != ''" Include="FullAssemblySigningSupported=$(FullAssemblySigningSupported)" />
<InnerBuildEnv Include="DotNetBuildFromSource=true" />
<InnerBuildEnv Include="DotNetBuildFromSource=$(ArcadeBuildFromSource)" />
<InnerBuildEnv Include="DotNetBuildVertical=$(ArcadeBuildVertical)" />
</ItemGroup>

<!-- Call the build.sh script to build the repo tasks. Set IgnoreStandardErrorWarningFormat
Expand All @@ -56,7 +57,15 @@
Command="./eng/build.sh --only-build-repo-tasks -bl $(_AdditionalRepoTaskBuildArgs)"
IgnoreStandardErrorWarningFormat="true"
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
EnvironmentVariables="@(InnerBuildEnv)" />
EnvironmentVariables="@(InnerBuildEnv)"
Condition="'$(OS)' != 'Windows_NT'" />

<Exec
Command=".\eng\build.cmd -OnlyBuildRepoTasks -bl $(_AdditionalRepoTaskBuildArgs)"
IgnoreStandardErrorWarningFormat="true"
WorkingDirectory="$(InnerSourceBuildRepoRoot)"
EnvironmentVariables="@(InnerBuildEnv)"
Condition="'$(OS)' == 'Windows_NT'" />
</Target>

<Target Name="CustomizeInnerBuildArgs"
Expand Down

0 comments on commit d77955f

Please sign in to comment.