SourceBuild.props 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <Project>
  2. <PropertyGroup>
  3. <GitHubRepositoryName>aspnetcore</GitHubRepositoryName>
  4. <SourceBuildManagedOnly>true</SourceBuildManagedOnly>
  5. <SourceBuildTrimNetFrameworkTargets>true</SourceBuildTrimNetFrameworkTargets>
  6. </PropertyGroup>
  7. <Target Name="PrepareGlobalJsonForSourceBuild"
  8. AfterTargets="PrepareInnerSourceBuildRepoRoot"
  9. BeforeTargets="RunInnerSourceBuildCommand">
  10. <Exec
  11. Command="./eng/scripts/prepare-sourcebuild-globaljson.sh"
  12. WorkingDirectory="$(InnerSourceBuildRepoRoot)" />
  13. </Target>
  14. <!--
  15. Remove inner source .globalconfig file as both the inner and outer config files get loaded and cause a conflict.
  16. Leaving the inner will cause all conflicting settings to be ignored.
  17. https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/configuration-files#general-options
  18. -->
  19. <Target Name="RemoveInnerGlobalConfig"
  20. DependsOnTargets="PrepareInnerSourceBuildRepoRoot"
  21. BeforeTargets="RunInnerSourceBuildCommand">
  22. <Delete Files="$(InnerSourceBuildRepoRoot).globalconfig" />
  23. </Target>
  24. <!--
  25. Build RepoTasks - this is normally triggered via the build script but the inner ArPow source-build is run via msbuild
  26. -->
  27. <Target Name="BuildRepoTasks"
  28. Condition="'$(ArcadeInnerBuildFromSource)' == 'true'"
  29. BeforeTargets="Execute">
  30. <!-- If the alternative runtime location and key are present, pass those through -->
  31. <PropertyGroup>
  32. <_AdditionalRepoTaskBuildArgs />
  33. <_AdditionalRepoTaskBuildArgs Condition="'$(DotNetRuntimeSourceFeed)' != ''" >$(_AdditionalRepoTaskBuildArgs) --runtimesourcefeed $(DotNetRuntimeSourceFeed)</_AdditionalRepoTaskBuildArgs>
  34. <_AdditionalRepoTaskBuildArgs Condition="'$(DotNetRuntimeSourceFeedKey)' != ''" >$(_AdditionalRepoTaskBuildArgs) --runtimesourcefeedkey $(DotNetRuntimeSourceFeedKey)</_AdditionalRepoTaskBuildArgs>
  35. </PropertyGroup>
  36. <ItemGroup>
  37. <!-- We need to flow FullAssemblySigningSupported even when building repo tasks because they use full signing -->
  38. <InnerBuildEnv Condition="'$(FullAssemblySigningSupported)' != ''" Include="FullAssemblySigningSupported=$(FullAssemblySigningSupported)" />
  39. </ItemGroup>
  40. <!-- Call the build.sh script to build the repo tasks. Set IgnoreStandardErrorWarningFormat
  41. to true. This avoids fatal errors, because in internal builds there are usually a few failed installation
  42. attempts as the install script walks through potential locations for a runtime.
  43. The overall build script will return a proper exit code, but we don't want to pick up the printed error messages. -->
  44. <Exec
  45. Command="./eng/build.sh --only-build-repo-tasks -bl $(_AdditionalRepoTaskBuildArgs)"
  46. IgnoreStandardErrorWarningFormat="true"
  47. WorkingDirectory="$(InnerSourceBuildRepoRoot)"
  48. EnvironmentVariables="@(InnerBuildEnv)" />
  49. </Target>
  50. <Target Name="CustomizeInnerBuildArgs"
  51. BeforeTargets="GetSourceBuildCommandConfiguration">
  52. <PropertyGroup>
  53. <InnerBuildArgs>$(InnerBuildArgs) /p:SourceBuildRuntimeIdentifier=$(TargetRuntimeIdentifier)</InnerBuildArgs>
  54. <InnerBuildArgs Condition="'$(SourceBuildUseMonoRuntime)' == 'true'">$(InnerBuildArgs) /p:CrossgenOutput=false</InnerBuildArgs>
  55. </PropertyGroup>
  56. </Target>
  57. <Target Name="GetAspnetcoreCategorizedIntermediateNupkgContents"
  58. BeforeTargets="GetCategorizedIntermediateNupkgContents">
  59. <PropertyGroup>
  60. <InstallersArtifactsDir>$(CurrentRepoSourceBuildArtifactsDir)\installers\$(Configuration)\</InstallersArtifactsDir>
  61. </PropertyGroup>
  62. <ItemGroup>
  63. <!--
  64. Add the internal installers artifacts required by dotnet/installer.
  65. -->
  66. <IntermediateNupkgArtifactFile Include="$(InstallersArtifactsDir)aspnetcore-runtime-*.tar.gz" />
  67. <IntermediateNupkgArtifactFile Include="$(InstallersArtifactsDir)aspnetcore_base_runtime.version" />
  68. </ItemGroup>
  69. </Target>
  70. </Project>