From 0216221e50f7235231276e490143e0f080de8233 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Thu, 5 May 2016 07:14:25 -0700 Subject: [PATCH] Revert "Fix DataProtection after build globbing changes will go in" This reverts commit f0ddc81e07363e0dc4679344a7528cfea2457a8a. --- makefile.shade | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/makefile.shade b/makefile.shade index d188794bba..e41996d498 100644 --- a/makefile.shade +++ b/makefile.shade @@ -11,27 +11,27 @@ var Configuration_Local = '${E("Configuration")}' default BASE_DIR_LOCAL='${Directory.GetCurrentDirectory()}' default TARGET_DIR_LOCAL='${Path.Combine(BASE_DIR_LOCAL, "artifacts")}' default BUILD_DIR_LOCAL='${Path.Combine(TARGET_DIR_LOCAL, "build")}' -default SRC_PROJECT_GLOB_LOCAL="src/*/project.json" -default TEST_PROJECT_GLOB_LOCAL="test/*/project.json" -#build-compile target='compile' +#build-compile target='compile' if='Directory.Exists("src")' @{ + Directory.CreateDirectory(TARGET_DIR_LOCAL); string commitHash = null; if (AddAssemblyInfo) { - var commitHashFile = Path.Combine(TARGET_DIR_LOCAL, "commit"); - GitCommand("rev-parse HEAD >> " + commitHashFile); - commitHash = File.ReadAllLines(commitHashFile)[0]; + var commitHashFile = Path.Combine(TARGET_DIR_LOCAL, "commit"); + GitCommand("rev-parse HEAD >> " + commitHashFile); + commitHash = File.ReadAllLines(commitHashFile)[0]; } - var srcProjects = Files.Include(SRC_PROJECT_GLOB_LOCAL).ToList(); + var projectFiles = Files.Include("src/*/project.json").ToList(); if (IsLinux) { - srcProjects.Remove("src/Microsoft.AspNetCore.DataProtection.SystemWeb/project.json"); + projectFiles.Remove("src/Microsoft.AspNetCore.DataProtection.SystemWeb/project.json"); } - srcProjects.ForEach(projectFile => + + projectFiles.ForEach(projectFile => { if (AddAssemblyInfo) { @@ -39,24 +39,24 @@ default TEST_PROJECT_GLOB_LOCAL="test/*/project.json" var project = (JsonObject)Json.Deserialize(projectText); var isSharedProject = project.Keys.Contains("shared"); - // We don't want to embed the commit hash in it because + // We don't want to embed the commit hash in it because // the consumers would get that file if (!isSharedProject) { - Console.WriteLine("Embedding commit hash in assembly"); - var projectFolder = Path.GetDirectoryName(projectFile); - var commitHashAttribute = String.Format("[assembly: System.Reflection.AssemblyMetadata(\"CommitHash\", \"{0}\")]", commitHash); + Console.WriteLine("Embedding commit hash in assembly"); + var projectFolder = Path.GetDirectoryName(projectFile); + var commitHashAttribute = String.Format("[assembly: System.Reflection.AssemblyMetadata(\"CommitHash\", \"{0}\")]", commitHash); - var buildInfoFile = Path.Combine(projectFolder, "BuildInfo.generated.cs"); - File.WriteAllText(buildInfoFile, commitHashAttribute); + var buildInfoFile = Path.Combine(projectFolder, "BuildInfo.generated.cs"); + File.WriteAllText(buildInfoFile, commitHashAttribute); } } - DotnetPack(projectFile, BUILD_DIR_LOCAL, Configuration_Local, ""); + + DotnetPack(projectFile, BUILD_DIR_LOCAL, Configuration_Local); }); - DotnetBuild(TEST_PROJECT_GLOB_LOCAL, Configuration_Local, BuildFramework); foreach (var nupkg in Files.Include(Path.Combine(BUILD_DIR_LOCAL, "*/" + Configuration_Local + "/*.nupkg"))) { File.Copy(nupkg, Path.Combine(BUILD_DIR_LOCAL, Path.GetFileName(nupkg)), true); } - } \ No newline at end of file + }