8000 Inner clone · dotnet/source-build-externals@785bf81 · GitHub
[go: up one dir, main page]

Skip to content

Commit 785bf81

Browse files
committed
Inner clone
1 parent 11ae976 commit 785bf81

File tree

5 files changed

+25
-24
lines changed

5 files changed

+25
-24
lines changed

eng/DotNetBuild.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<!-- When altering this file, please include @dotnet/product-construction as a reviewer. -->
22
<Project>
33

4+
<!-- TODO: Remove when inner clone functionality is removed from ArPow SB. -->
5+
<PropertyGroup>
6+
<UseInnerClone>false</UseInnerClone>
7+
</PropertyGroup>
8+
49
<Target Name="AddSourceBuiltPackagesToSourceBuiltCache"
510
BeforeTargets="WritePrebuiltUsageData">
611
<ItemGroup>

patches/abstractions-xunit/0001-Patching.patch

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,10 @@ Date: Wed, 19 Jul 2023 11:47:26 -0700
44
Subject: [PATCH] Patching
55

66
---
7-
global.json | 6 ------
87
src/xunit.abstractions/Properties/AssemblyInfo.cs | 2 +-
98
src/xunit.abstractions/xunit.abstractions.csproj | 11 +++--------
10-
3 files changed, 4 insertions(+), 15 deletions(-)
11-
delete mode 100644 global.json
9+
2 files changed, 4 insertions(+), 9 deletions(-)
1210

13-
diff --git a/global.json b/global.json
14-
deleted file mode 100644
15-
index 9f78419..0000000
16-
--- a/global.json
17-
+++ /dev/null
18-
@@ -1,6 +0,0 @@
19-
-{
20-
- "sdk": {
21-
- "version": "6.0.0",
22-
- "rollForward": "latestMinor"
23-
- }
24-
-}
2511
diff --git a/src/xunit.abstractions/Properties/AssemblyInfo.cs b/src/xunit.abstractions/Properties/AssemblyInfo.cs
2612
index 041f22b..c5b5124 100644
2713
--- a/src/xunit.abstractions/Properties/AssemblyInfo.cs
@@ -56,6 +42,3 @@ index fa4cf23..5d61131 100644
5642
- </ItemGroup>
5743
-
5844
</Project>
59-
--
60-
2.41.0.windows.2
61-

repo-projects/Directory.Build.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
<PropertyGroup>
66
<TargetFramework>$(NetCurrent)</TargetFramework>
7-
87
<RepositoryName>$(MSBuildProjectName)</RepositoryName>
9-
<ProjectDirectory>$(SubmoduleDirectory)$(RepositoryName)/</ProjectDirectory>
108

9+
<OriginalProjectDirectory>$([MSBuild]::NormalizeDirectory('$(SubmoduleDirectory)', '$(RepositoryName)'))</OriginalProjectDirectory>
10+
<ProjectDirectory>$([MSBuild]::NormalizeDirectory('$(OriginalProjectDirectory)', 'artifacts', 'clone'))</ProjectDirectory>
1111
<ArtifactsLogRepoDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsLogDir)', '$(RepositoryName)'))</ArtifactsLogRepoDir>
12+
1213
<MinimalConsoleLogOutput Condition="'$(MinimalConsoleLogOutput)' == ''">true</MinimalConsoleLogOutput>
1314
<RepoConsoleLogFile>$(ArtifactsLogRepoDir)$(RepositoryName).log</RepoConsoleLogFile>
1415
<RedirectRepoOutputToLog Condition="'$(MinimalConsoleLogOutput)' == 'true'">&gt; $(RepoConsoleLogFile) 2&gt;&amp;1</RedirectRepoOutputToLog>

repo-projects/Directory.Build.targets

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,18 @@
1919
<MSBuild Projects="@(_DependentProject)" Targets="Build" BuildInParallel="$(BuildInParallel)" StopOnFirstFailure="true" />
2020
</Target>
2121

22+
& 8000 lt;Target Name="PrepareInnerClone">
23+
<ItemGroup>
24+
<RepoFileToCopy Include="$(OriginalProjectDirectory)**\*"
25+
Exclude="$(OriginalProjectDirectory)artifacts\**\*" />
26+
</ItemGroup>
27+
28+
<Copy SourceFiles="@(RepoFileToCopy)" DestinationFolder="$(ProjectDirectory)%(RecursiveDir)" SkipUnchangedFiles="true" />
29+
</Target>
30+
2231
<Target Name="ApplyPatches"
2332
Condition="'@(PatchToApply)' != '' and '$(SkipPatches)' != 'true'"
33+
DependsOnTargets="PrepareInnerClone"
2434
Inputs="@(PatchToApply)"
2535
Outputs="$(BaseIntermediateOutputPath)ApplyPatches.complete" >
2636
<PropertyGroup>
@@ -101,7 +111,7 @@
101111
<!-- Root target for nuget updates. Removes the existing nuget config files, then adds a new one for dependencies
102112
if necessary. -->
103113
<Target Name="UpdateNuGetConfig"
104-
DependsOnTargets="RemoveNuGetConfig;AddNewNuGetConfigForDependencies"
114+
DependsOnTargets="PrepareInnerClone;RemoveNuGetConfig;AddNewNuGetConfigForDependencies"
105115
Condition="'$(NuGetConfigFile)' != '' OR '@(NuGetConfigFiles)' != '' OR '@(RepositoryReference)' != ''"
106116
Inputs="$(MSBuildProjectFullPath)"
107117
Outputs="$(BaseIntermediateOutputPath)UpdateNuGetConfig.complete">
@@ -114,7 +124,7 @@
114124

115125
<UsingTask TaskName="UpdateJson" AssemblyFile="$(XPlatSourceBuildTasksAssembly)" TaskFactory="TaskHostFactory" />
116126
<Target Name="UpdateGlobalJsonVersions"
117-
DependsOnTargets="ResolveProjectReferences"
127+
DependsOnTargets="PrepareInnerClone;ResolveProjectReferences"
118128
Condition="'$(GlobalJsonFile)' != ''"
119129
Inputs="$(MSBuildProjectFullPath)"
120130
Outputs="$(BaseIntermediateOutputPath)UpdateGlobalJsonVersions.complete">
@@ -139,7 +149,7 @@
139149
</Target>
140150

141151
<Target Name="RepoBuild"
142-
DependsOnTargets="PrepareOutputDirectories"
152+
DependsOnTargets="PrepareOutputDirectories;PrepareInnerClone"
143153
Inputs="$(MSBuildProjectFullPath)"
144154
Outputs="$(BaseIntermediateOutputPath)RepoBuild.complete">
145155
<ItemGroup>
@@ -180,7 +190,7 @@
180190

181191
<Target Name="Package"
182192
Condition="'$(BuildPackagesCommand)' != ''"
183-
DependsOnTargets="PrepareOutputDirectories"
193+
DependsOnTargets="PrepareOutputDirectories;PrepareInnerClone"
184194
Inputs="$(MSBuildProjectFullPath)"
185195
Outputs="$(BaseIntermediateOutputPath)Package.complete">
186196
<Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Packaging '$(RepositoryName)'" />
@@ -218,6 +228,7 @@
218228
<Target Name="Build"
219229
DependsOnTargets="
220230
BuildRepoReferences;
231+
PrepareInnerClone;
221232
ApplyPatches;
222233
UpdateNuGetConfig;
223234
UpdateGlobalJsonVersions;

repo-projects/abstractions-xunit.proj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<PackagesOutput>$(ProjectDirectory)src/xunit.abstractions/bin/$(Configuration)/</PackagesOutput>
55
<XunitAbstractionsKeyFilePath>$(KeysDir)xunit.abstractions.snk</XunitAbstractionsKeyFilePath>
6+
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
67
<CustomRepoBuild>true</CustomRepoBuild>
78
</PropertyGroup>
89

0 commit comments

Comments
 (0)
0