diff --git a/build-template/NuGet.master.config b/build-template/NuGet.master.config index b004e5cc74..9a79e2ef47 100644 --- a/build-template/NuGet.master.config +++ b/build-template/NuGet.master.config @@ -2,6 +2,7 @@ + \ No newline at end of file diff --git a/makefile.shade b/makefile.shade index a010dd3a83..945cbd9526 100644 --- a/makefile.shade +++ b/makefile.shade @@ -221,7 +221,9 @@ var buildTarget = "compile" "Coherence", "Coherence-Signed", "dnvm", - "Entropy" + "Entropy", + "Setup", + "libuv-build", }; Exec("cmd", "/C dnu restore", @"tools\PinVersion"); @@ -247,36 +249,12 @@ var buildTarget = "compile" var repoPath = Path.Combine(Directory.GetCurrentDirectory(), repo); Exec("dnx", - string.Format(@"run ""{0}"" ""{1}"" ""{2}"" ""{3}""", + string.Format(@"run ""{0}"" ""{1}"" ""{2}""", Path.Combine(Directory.GetCurrentDirectory(), repo), COHERENCE_FEED, - KOREBUILD_VERSION, - NUGET_VERSION), + KOREBUILD_VERSION), @"tools\PinVersion"); - // Build projects to produce project.lock.json - Exec("build.cmd", "compile", repo); - - // Replace lock=true in project.lock.json - foreach(var file in Directory.GetFiles(repo, "project.lock.json", SearchOption.AllDirectories)) - { - var contents = File.ReadAllText(file); - var newContents = contents.Replace("\"locked\": false", "\"locked\": true"); - File.WriteAllText(file, newContents); - } - - // Add the project.json and project.lock.json files - foreach(var file in Directory.GetFiles(repo, "project*.json", SearchOption.AllDirectories)) - { - var gitFilePath = file.Substring(file.IndexOf(repo) + repo.Length + 1); - - // Check if this needs to be included - if(ShouldIncludeProjectJson(gitFilePath)) - { - GitCommand(repo, string.Format("add -f {0}", gitFilePath)); - } - } - GitCommand(repo, "commit -am \"Updating json files to pin versions and build.cmd to pin KoreBuild and DNX\""); } @@ -625,13 +603,6 @@ functions Log.Warn(string.Format("Unable to clone repository at '{0}': {1}", repoUrl, ex.Message)); return; } - - // Configuring Git bug tracking settings hangs from time to time on Win7/2008 when running as part of the CI build - if (!IsTeamCity) - { - GitConfig("bugtraq.url", "http://github.com/aspnet/" + repo + "/issues/%BUGID%", repo); - GitConfig("bugtraq.logregex", @"#(\d+)", repo); - } } } diff --git a/tools/PinVersion/Program.cs b/tools/PinVersion/Program.cs index e8e2b8dcf8..f6c7ff1463 100644 --- a/tools/PinVersion/Program.cs +++ b/tools/PinVersion/Program.cs @@ -67,7 +67,7 @@ namespace PinVersion using (var fileWriter = new JsonTextWriter(new StreamWriter(file))) { fileWriter.Formatting = Formatting.Indented; - fileWriter.Indentation = 4; + fileWriter.Indentation = 2; projectJson.WriteTo(fileWriter); } } @@ -100,6 +100,21 @@ namespace PinVersion // Replace all content of the file File.WriteAllText(buildCmdFile, buildCmdFileContent); + + // Pin the global.json + var globalJsonPath = Path.Combine(repositoryPath, "global.json"); + var globalJson = JObject.Parse(File.ReadAllText(globalJsonPath)); + globalJson["sdk"] = new JObject + { + ["version"] = dnxPackage.Version.ToNormalizedString() + }; + + using (var fileWriter = new JsonTextWriter(new StreamWriter(globalJsonPath))) + { + fileWriter.Formatting = Formatting.Indented; + fileWriter.Indentation = 2; + globalJson.WriteTo(fileWriter); + } } } }