Identify the difference between skipped and shipped repositories
This commit is contained in:
parent
3bc3ca2a41
commit
0ade3698b4
|
|
@ -110,7 +110,8 @@
|
||||||
Targets="ResolveSolutions"
|
Targets="ResolveSolutions"
|
||||||
Properties="RepositoryRoot=%(Repository.RootPath);Configuration=$(Configuration);BuildNumber=$(BuildNumber)"
|
Properties="RepositoryRoot=%(Repository.RootPath);Configuration=$(Configuration);BuildNumber=$(BuildNumber)"
|
||||||
ContinueOnError="WarnAndContinue">
|
ContinueOnError="WarnAndContinue">
|
||||||
<Output TaskParameter="TargetOutputs" ItemName="Solution" />
|
<Output TaskParameter="TargetOutputs" ItemName="Solution" Condition="'%(Repository.Build)' == 'true'" />
|
||||||
|
<Output TaskParameter="TargetOutputs" ItemName="_NoBuildSolution" Condition="'%(Repository.Build)' != 'true'" />
|
||||||
</MSBuild>
|
</MSBuild>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
@ -127,13 +128,14 @@
|
||||||
Targets="ResolveSolutions"
|
Targets="ResolveSolutions"
|
||||||
Properties="RepositoryRoot=%(ShippedRepository.RootPath);Configuration=$(Configuration);BuildNumber=$(BuildNumber)"
|
Properties="RepositoryRoot=%(ShippedRepository.RootPath);Configuration=$(Configuration);BuildNumber=$(BuildNumber)"
|
||||||
ContinueOnError="WarnAndContinue">
|
ContinueOnError="WarnAndContinue">
|
||||||
<Output TaskParameter="TargetOutputs" ItemName="_NoBuildSolution" />
|
<Output TaskParameter="TargetOutputs" ItemName="_ShippedSolution" />
|
||||||
</MSBuild>
|
</MSBuild>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Solution Update="@(Solution)" Build="true" />
|
<Solution Update="@(Solution)" Build="true" />
|
||||||
|
<_ShippedSolution Update="@(_ShippedSolution)" Build="false" Shipped="true" />
|
||||||
<_NoBuildSolution Update="@(_NoBuildSolution)" Build="false" />
|
<_NoBuildSolution Update="@(_NoBuildSolution)" Build="false" />
|
||||||
<Solution Include="@(_NoBuildSolution)" />
|
<Solution Include="@(_NoBuildSolution);@(_ShippedSolution)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Error Text="No solutions were found in '$(SubmoduleRoot)'" Condition="@(Solution->Count()) == 0" />
|
<Error Text="No solutions were found in '$(SubmoduleRoot)'" Condition="@(Solution->Count()) == 0" />
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ namespace RepoTasks
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!solution.ShouldBuild)
|
if (!solution.ShouldBuild && solution.Shipped)
|
||||||
{
|
{
|
||||||
reposThatShouldPatch.Add(Path.GetFileName(Path.GetDirectoryName(solution.FullPath)));
|
reposThatShouldPatch.Add(Path.GetFileName(Path.GetDirectoryName(solution.FullPath)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace RepoTasks.ProjectModel
|
||||||
{
|
{
|
||||||
internal class SolutionInfo
|
internal class SolutionInfo
|
||||||
{
|
{
|
||||||
public SolutionInfo(string fullPath, string configName, IReadOnlyList<ProjectInfo> projects, bool shouldBuild)
|
public SolutionInfo(string fullPath, string configName, IReadOnlyList<ProjectInfo> projects, bool shouldBuild, bool shipped)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(fullPath))
|
if (string.IsNullOrEmpty(fullPath))
|
||||||
{
|
{
|
||||||
|
|
@ -24,11 +24,13 @@ namespace RepoTasks.ProjectModel
|
||||||
ConfigName = configName;
|
ConfigName = configName;
|
||||||
Projects = projects ?? throw new ArgumentNullException(nameof(projects));
|
Projects = projects ?? throw new ArgumentNullException(nameof(projects));
|
||||||
ShouldBuild = shouldBuild;
|
ShouldBuild = shouldBuild;
|
||||||
|
Shipped = shipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string FullPath { get; }
|
public string FullPath { get; }
|
||||||
public string ConfigName { get; }
|
public string ConfigName { get; }
|
||||||
public IReadOnlyList<ProjectInfo> Projects { get; }
|
public IReadOnlyList<ProjectInfo> Projects { get; }
|
||||||
public bool ShouldBuild { get; }
|
public bool ShouldBuild { get; }
|
||||||
|
public bool Shipped { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,12 +85,14 @@ namespace RepoTasks.ProjectModel
|
||||||
}
|
}
|
||||||
|
|
||||||
bool.TryParse(solution.GetMetadata("Build"), out var shouldBuild);
|
bool.TryParse(solution.GetMetadata("Build"), out var shouldBuild);
|
||||||
|
bool.TryParse(solution.GetMetadata("Shipped"), out var shipped);
|
||||||
|
|
||||||
var solutionInfo = new SolutionInfo(
|
var solutionInfo = new SolutionInfo(
|
||||||
solutionFile,
|
solutionFile,
|
||||||
configName,
|
configName,
|
||||||
projects.ToArray(),
|
projects.ToArray(),
|
||||||
shouldBuild);
|
shouldBuild,
|
||||||
|
shipped);
|
||||||
|
|
||||||
_buildEngine.RegisterTaskObject(key, solutionInfo, RegisteredTaskObjectLifetime.Build, allowEarlyCollection: true);
|
_buildEngine.RegisterTaskObject(key, solutionInfo, RegisteredTaskObjectLifetime.Build, allowEarlyCollection: true);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue