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
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -34,10 +34,6 @@ cmake/
|
|||
# stage0 install directory
|
||||
.dotnet_stage0
|
||||
|
||||
# `dotnet new` project.json.template files are generated by a pre-build step.
|
||||
# ignore these files
|
||||
/src/dotnet/commands/dotnet-new/**/project.json.template
|
||||
|
||||
### VisualStudio.gitignore from https://raw.githubusercontent.com/github/gitignore/master/VisualStudio.gitignore ###
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace Microsoft.DotNet.Scripts
|
|||
|
||||
IEnumerable<string> projectJsonFiles = Enumerable.Union(
|
||||
Directory.GetFiles(Dirs.RepoRoot, "project.json", SearchOption.AllDirectories),
|
||||
Directory.GetFiles(Path.Combine(Dirs.RepoRoot, @"src\dotnet\commands\dotnet-new"), "project.json.pretemplate", SearchOption.AllDirectories))
|
||||
Directory.GetFiles(Path.Combine(Dirs.RepoRoot, @"src\dotnet\commands\dotnet-new"), "project.json.template", SearchOption.AllDirectories))
|
||||
.Where(p => !File.Exists(Path.Combine(Path.GetDirectoryName(p), noUpdateFileName)));
|
||||
|
||||
JObject projectRoot;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "$(NetCoreAppVersion)"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"frameworks": {
|
|
@ -13,7 +13,7 @@
|
|||
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160316",
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "$(NetCoreAppVersion)"
|
||||
"version": "1.0.0-rc3-004306"
|
||||
}
|
||||
},
|
||||
"tools": {
|
Loading…
Add table
Add a link
Reference in a new issue