SourceBuild.props 3.5 KB

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