8000 Repo infrastructure improvements & UseInnerClone by ViktorHofer · Pull Request #478 · dotnet/source-build-externals · GitHub
[go: up one dir, main page]

Skip to content

Repo infrastructure improvements & UseInnerClone #478

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

Merged
merged 2 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 7 additions & 69 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,85 +1,23 @@
<Project>

<PropertyGroup>
<ImportNetSdkFromRepoToolset>false</ImportNetSdkFromRepoToolset>
<_SuppressSdkImports>true</_SuppressSdkImports>
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
</PropertyGroup>

<Import Condition="'$(SkipArcadeSdkImport)' != 'true'" Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<PropertyGroup>
<!-- Fake, for SDK. -->
<TargetFramework>netstandard2.0</TargetFramework>
<!-- We have no projects targeting multiple frameworks, so don't include in output path. -->
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />

<!-- This repo's projects are entirely infrastructure and do not ship. -->
<PropertyGroup>
<!-- This repo's projects are entirely infrastructure and do not ship. -->
<IsShipping>false</IsShipping>
</PropertyGroup>

<PropertyGroup>
<ProjectDir>$(MSBuildThisFileDirectory)</ProjectDir>
<TargetsDir>$(ProjectDir)targets/</TargetsDir>
<KeysDir>$(ProjectDir)keys/</KeysDir>
<DotNetCliToolDir Condition="'$(DotNetCliToolDir)' == '' and '$(CustomDotNetSdkDir)' != ''">$([MSBuild]::EnsureTrailingSlash('$(CustomDotNetSdkDir)'))</DotNetCliToolDir>
<DotNetCliToolDir Condition="'$(DotNetCliToolDir)' == '' and '$(DOTNET_INSTALL_DIR)' != ''">$([MSBuild]::NormalizeDirectory('$(DOTNET_INSTALL_DIR)'))</DotNetCliToolDir>
<DotNetCliToolDir Condition="'$(DotNetCliToolDir)' == ''">$(ProjectDir).dotnet/</DotNetCliToolDir>
<DotnetToolCommand>$(DotNetCliToolDir)dotnet</DotnetToolCommand>
<SubmoduleDirectory>$(ProjectDir)src/</SubmoduleDirectory>
<PatchesDir>$(ProjectDir)patches/</PatchesDir>
<!-- if we're not currently building, Visual Studio will still set this -->
<SDK_VERSION Condition="'$(SDK_VERSION)' == ''">$(NETCoreSdkVersion)</SDK_VERSION>
<XPlatTasksDir>$(MSBuildThisFileDirectory)eng/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/</XPlatTasksDir>
<XPlatTasksBinDir>$(XPlatTasksDir)bin/$(Configuration)/</XPlatTasksBinDir>
<XPlatSourceBuildTasksAssembly>$(XPlatTasksBinDir)Microsoft.DotNet.SourceBuild.Tasks.XPlat.dll</XPlatSourceBuildTasksAssembly>
<SdkReferenceDir>$(DotNetCliToolDir)sdk/$(SDK_VERSION)/</SdkReferenceDir>
</PropertyGroup>

<!--
'.proj' has no DefaultLanguageSourceExtension, causing **/* to be collected
in Compile items! Avoid this by disabling the default items.
-->
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.proj'">
<EnableDefaultItems>false</EnableDefaultItems>
</PropertyGroup>

<PropertyGroup>
<LogVerbosity Condition="'$(LogVerbosity)'==''">minimal</LogVerbosity>
</PropertyGroup>

<PropertyGroup>
<BuildInParallel Condition="'$(BuildInParallel)'==''">false</BuildInParallel>
</PropertyGroup>
<XPlatSourceBuildTasksAssembly>$([MSBuild]::NormalizePath('$(ArtifactsBinDir)', 'Microsoft.DotNet.SourceBuild.Tasks.XPlat', '$(Configuration)', '$(NetCurrent)', 'Microsoft.DotNet.SourceBuild.Tasks.XPlat.dll'))</XPlatSourceBuildTasksAssembly>

<PropertyGroup>
<ShellExtension Condition="'$(OS)' == 'Windows_NT'">.cmd</ShellExtension>
<ShellExtension Condition="'$(OS)' != 'Windows_NT'">.sh</ShellExtension>
<TarBallExtension Condition="'$(OS)' == 'Windows_NT'">.zip</TarBallExtension>
<TarBallExtension Condition="'$(OS)' != 'Windows_NT'">.tar.gz</TarBallExtension>
</PropertyGroup>

<PropertyGroup>
<SubmoduleDirectory Condition="'$(SubmoduleDirectory)' == ''">$(ProjectDir)src/</SubmoduleDirectory>
<GitModulesPath>$(ProjectDir).gitmodules</GitModulesPath>
</PropertyGroup>

<PropertyGroup>
<!-- Init basic Arcade props, if the project importing this file doesn't use Arcade. -->
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$(ProjectDir)artifacts/</ArtifactsDir>
<RepositoryEngineeringDir Condition="'$(RepositoryEngineeringDir)' == ''">$(ProjectDir)eng/</RepositoryEngineeringDir>
</PropertyGroup>

<PropertyGroup>
<SourceBuiltPackagesPath>$(ArtifactsShippingPackagesDir)</SourceBuiltPackagesPath>
<LoggingDir>$(BaseOutputPath)logs/</LoggingDir>
</PropertyGroup>

<!--
Semaphore path for incremental builds
-->
<PropertyGroup>
<CompletedSemaphorePath>$(BaseIntermediatePath)semaphores/</CompletedSemaphorePath>
<LogVerbosity Condition="'$(LogVerbosity)' == ''">minimal</LogVerbosity>
<BuildInParallel Condition="'$(BuildInParallel)' == ''">false</BuildInParallel>
</PropertyGroup>

</Project>
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>

<Import Condition="'$(SkipArcadeSdkImport)' != 'true'" Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />

</Project>
7 changes: 0 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,4 @@ while [[ -h $source ]]; do
done

scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"

sdkLine=$(grep -m 1 'dotnet' "$scriptroot/global.json")
sdkPattern="\"dotnet\" *: *\"(.*)\""
if [[ $sdkLine =~ $sdkPattern ]]; then
export SDK_VERSION=${BASH_REMATCH[1]}
fi

"$scriptroot/eng/common/build.sh" --build --restore "$@"
3 changes: 0 additions & 3 deletions eng/Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<Project>

<ItemGroup>
<ProjectToBuild Include="$(RepoRoot)eng\tasks\Microsoft.DotNet.SourceBuild.Tasks.XPlat\*.csproj">
<BuildInParallel>false</BuildInParallel>
</ProjectToBuild>
<ProjectToBuild Include="$(RepoRoot)repo-projects\*.proj" />
</ItemGroup>

Expand Down
16 changes: 8 additions & 8 deletions eng/DotNetBuild.props
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<!-- When altering this file, please include @dotnet/product-construction as a reviewer. -->

<Project>

<PropertyGroup>
<GitHubRepositoryName>source-build-externals</GitHubRepositoryName>
<SourceBuildManagedOnly>true</SourceBuildManagedOnly>
<!-- TODO: Remove when inner clone functionality is removed from ArPow SB. -->
<UseInnerClone>false</UseInnerClone>
</PropertyGroup>

<Target Name="AddSourceBuiltPackagesToSourceBuiltCache"
BeforeTargets="WritePrebuiltUsageData">
<ItemGroup>
<SourceBuiltPackageFiles Include="$(CurrentRepoSourceBuildArtifactsPackagesDir)**\*.nupkg"/>
</ItemGroup>
<!-- TODO: Remove when https://github.com/dotnet/dotnet/pull/176 is merged and consumed. -->
<Target Name="UpdateWritePrebuiltData" BeforeTargets="WritePrebuiltData">
<PropertyGroup>
<SourceBuildOutputDir>$(RepoRoot)</SourceBuildOutputDir>
</PropertyGroup>
</Target>

</Project>
3 changes: 1 addition & 2 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>
<!-- Repo Version Information -->
<PropertyGroup>
<MajorVersion>10</MajorVersion>
Expand Down
138 changes: 0 additions & 138 deletions eng/git-clone-to-dir.sh

This file was deleted.

26 changes: 0 additions & 26 deletions eng/tasks/Directory.Build.props

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,16 @@

<PropertyGroup>
<TargetFramework>$(NetCurrent)</TargetFramework>
<OutputPath>$(XPlatTasksBinDir)</OutputPath>
</PropertyGroup>

<PropertyGroup>
<!-- Default assembly version causes CS7034. Assembly info is not necessary given this
msbuild task assembly is for build only purposes. -->
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<Deterministic>False</Deterministic>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Build" Version="$(MicrosoftBuildVersion)" />
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildVersion)" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildVersion)" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" />
</ItemGroup>

<ItemGroup>
<Reference Include="@(SdkAssemblyReference)" />
</ItemGroup>

</Project>
Loading
0