Update dotnet-new project.json templates
Now that Microsoft.NETCore.App is built in a separate repo, we don't need the project.json.pretemplate files.
This commit is contained in:
parent
06ec7ddf47
commit
70ed305171
5 changed files with 3 additions and 29 deletions
|
@ -36,7 +36,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
// All major targets will depend on this in order to ensure variables are set up right if they are run independently
|
||||
[Target(
|
||||
nameof(GenerateVersions),
|
||||
nameof(UpdateTemplateVersions),
|
||||
nameof(CheckPrereqs),
|
||||
nameof(LocateStage0),
|
||||
nameof(ExpectedBuildArtifacts),
|
||||
|
@ -87,27 +86,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the Microsoft.NETCore.App version number in the `dotnet new` project.json.template files.
|
||||
/// </summary>
|
||||
[Target]
|
||||
public static BuildTargetResult UpdateTemplateVersions(BuildTargetContext c)
|
||||
{
|
||||
IEnumerable<string> templateFiles = Directory.GetFiles(
|
||||
Path.Combine(Dirs.RepoRoot, "src", "dotnet", "commands", "dotnet-new"),
|
||||
"project.json.pretemplate",
|
||||
SearchOption.AllDirectories);
|
||||
|
||||
foreach (string templateFile in templateFiles)
|
||||
{
|
||||
JObject projectRoot = JsonUtils.ReadProject(templateFile);
|
||||
projectRoot["dependencies"]["Microsoft.NETCore.App"]["version"] = DependencyVersions.SharedFrameworkVersion;
|
||||
JsonUtils.WriteProject(projectRoot, Path.ChangeExtension(templateFile, "template"));
|
||||
}
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
public static BuildTargetResult LocateStage0(BuildTargetContext c)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue