Stub out a task to validate cascading version effects (#557)
This commit is contained in:
parent
9c0eea3788
commit
9eb27fa53f
|
|
@ -57,12 +57,13 @@
|
|||
|
||||
<Target Name="CloneRepositories" DependsOnTargets="_PrepareRepositories">
|
||||
<ItemGroup>
|
||||
<_CloneRepositories Include="@(Repository);@(VerifyRepositories)" />
|
||||
<_CloneRepository Include="$(MSBuildProjectFullPath)">
|
||||
<AdditionalProperties>
|
||||
CloneRepository=%(Repository.Identity);
|
||||
CloneUrl=%(Repository.CloneUrl);
|
||||
CloneBranch=%(Repository.Branch);
|
||||
CloneRepositoryCommit=%(Repository.Commit);
|
||||
CloneRepository=%(_CloneRepositories.Identity);
|
||||
CloneUrl=%(_CloneRepositories.CloneUrl);
|
||||
CloneBranch=%(_CloneRepositories.Branch);
|
||||
CloneRepositoryCommit=%(_CloneRepositories.Commit);
|
||||
UseGateBranch=$(UseGateBranch)
|
||||
</AdditionalProperties>
|
||||
</_CloneRepository>
|
||||
|
|
@ -110,12 +111,22 @@
|
|||
Condition="'$(CloneRepositoryCommit)'!=''" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PrepareBuildGraph" DependsOnTargets="_PrepareRepositories">
|
||||
<RepoTasks.VerifyBuildGraph
|
||||
BuildRepositories="@(Repositories)"
|
||||
NoBuildRepositories="@(VerifyRepositories)">
|
||||
|
||||
<!-- TODO pass this into the PinVersion step -->
|
||||
<Output TaskParameter="PackagesToBeProduced" ItemName="PackagesToBeProduced" />
|
||||
</RepoTasks.VerifyBuildGraph>
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildRepositories"
|
||||
DependsOnTargets="_PrepareRepositories;_FindDotNetPath;_CreateRepositoriesListWithCommits;_UpdateNuGetConfig;_GenerateBuildGraph;_BuildRepositories" />
|
||||
|
||||
<Target Name="_PrepareRestoreGraphSpecs" DependsOnTargets="_PrepareRepositories">
|
||||
<ItemGroup>
|
||||
<Solution Include="$(_CloneRepositoryRoot)%(Repository.Identity)\*.sln">
|
||||
<Solution Include="$(_CloneRepositoryRoot)%(_CloneRepositories.Identity)\*.sln">
|
||||
<Repository>%(Repository.Identity)</Repository>
|
||||
</Solution>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,4 +4,5 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<UsingTask TaskName="RepoTasks.CalculateBuildGraph" AssemblyFile="$(_RepoTaskAssembly)" />
|
||||
</Project>
|
||||
<UsingTask TaskName="RepoTasks.VerifyBuildGraph" AssemblyFile="$(_RepoTaskAssembly)" />
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
|
||||
namespace RepoTasks
|
||||
{
|
||||
public class VerifyBuildGraph : Task
|
||||
{
|
||||
/// <summary>
|
||||
/// Repositories that we are building new versions of.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public ITaskItem[] BuildRepositories { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Repos that have already been build and released. We don't compile and build them,
|
||||
/// but we still want to be sure their packages are accounted for in our graph calculations.
|
||||
/// </summary>
|
||||
public ITaskItem[] NoBuildRepositories { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// New packages we are compiling. Used in the pin tool.
|
||||
/// </summary>
|
||||
[Output]
|
||||
public ITaskItem[] PackagesToBeProduced { get; set; }
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue