From 1e29b52278bbcec6d1f79fff296567e4db515754 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Sat, 28 Mar 2015 12:10:12 -0700 Subject: [PATCH] Rename "dnu bundle" to "dnu publish" --- src/MusicStore.Spa/project.json | 2 +- src/MusicStore/project.json | 2 +- test/E2ETests/Common/DeploymentUtility.cs | 40 +++++++++++------------ test/E2ETests/Common/StartParameters.cs | 6 ++-- test/E2ETests/PublishAndRunTests.cs | 6 ++-- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/MusicStore.Spa/project.json b/src/MusicStore.Spa/project.json index 9c03e58e9a..3fd3ac3f88 100644 --- a/src/MusicStore.Spa/project.json +++ b/src/MusicStore.Spa/project.json @@ -6,7 +6,7 @@ "node_modules", "grunt" ], - "bundleExclude": [ + "publishExclude": [ "bower.json", "package.json", "gruntfile.js", diff --git a/src/MusicStore/project.json b/src/MusicStore/project.json index 8c155f4f29..8f436cf236 100644 --- a/src/MusicStore/project.json +++ b/src/MusicStore/project.json @@ -9,7 +9,7 @@ "**/*.cs", "../../test/E2ETests/compiler/shared/**/*.cs" // This code is for testing only. ], - "bundleExclude": "*.cmd", + "publishExclude": "*.cmd", "webroot": "wwwroot", "dependencies": { "EntityFramework.SqlServer": "7.0.0-*", diff --git a/test/E2ETests/Common/DeploymentUtility.cs b/test/E2ETests/Common/DeploymentUtility.cs index e6d971b4bb..a8beff91a8 100644 --- a/test/E2ETests/Common/DeploymentUtility.cs +++ b/test/E2ETests/Common/DeploymentUtility.cs @@ -33,8 +33,8 @@ namespace E2ETests } else { - // Cannot override with environment in case of IIS. Bundle and write a Microsoft.AspNet.Hosting.ini file. - startParameters.BundleApplicationBeforeStart = true; + // Cannot override with environment in case of IIS. Publish and write a Microsoft.AspNet.Hosting.ini file. + startParameters.PublishApplicationBeforeStart = true; } } @@ -50,14 +50,14 @@ namespace E2ETests startParameters.Runtime = SwitchPathToRuntimeFlavor(startParameters.RuntimeFlavor, startParameters.RuntimeArchitecture, logger); //Reason to do pack here instead of in a common place is use the right runtime to do the packing. Previous line switches to use the right runtime. - if (startParameters.BundleApplicationBeforeStart) + if (startParameters.PublishApplicationBeforeStart) { #if DNX451 if (startParameters.ServerType == ServerType.IISNativeModule || startParameters.ServerType == ServerType.IIS) { - // Bundle to IIS root\application folder. - DnuBundle(startParameters, logger, Path.Combine(Environment.GetEnvironmentVariable("SystemDrive") + @"\", @"inetpub\wwwroot")); + // Publish to IIS root\application folder. + DnuPublish(startParameters, logger, Path.Combine(Environment.GetEnvironmentVariable("SystemDrive") + @"\", @"inetpub\wwwroot")); // Drop a Microsoft.AspNet.Hosting.ini with ASPNET_ENV information. logger.LogInformation("Creating Microsoft.AspNet.Hosting.ini file with ASPNET_ENV."); @@ -96,7 +96,7 @@ namespace E2ETests else #endif { - DnuBundle(startParameters, logger); + DnuPublish(startParameters, logger); } } @@ -136,11 +136,11 @@ namespace E2ETests throw new Exception("Runtime not detected on the machine."); } - if (startParameters.BundleApplicationBeforeStart) + if (startParameters.PublishApplicationBeforeStart) { // We use full path to runtime to pack. startParameters.Runtime = new DirectoryInfo(runtimeBin).Parent.FullName; - DnuBundle(startParameters, logger); + DnuPublish(startParameters, logger); } //Mono now supports --appbase @@ -180,7 +180,7 @@ namespace E2ETests startParameters.ApplicationHostConfigTemplateContent.Replace("[ApplicationPhysicalPath]", Path.Combine(startParameters.ApplicationPath, "wwwroot")); } - if (!startParameters.BundleApplicationBeforeStart) + if (!startParameters.PublishApplicationBeforeStart) { IISExpressHelper.CopyAspNetLoader(startParameters.ApplicationPath); } @@ -291,17 +291,17 @@ namespace E2ETests return runtimeName; } - private static void DnuBundle(StartParameters startParameters, ILogger logger, string bundleRoot = null) + private static void DnuPublish(StartParameters startParameters, ILogger logger, string publishRoot = null) { - startParameters.BundledApplicationRootPath = Path.Combine(bundleRoot ?? Path.GetTempPath(), Guid.NewGuid().ToString()); + startParameters.PublishedApplicationRootPath = Path.Combine(publishRoot ?? Path.GetTempPath(), Guid.NewGuid().ToString()); var parameters = string.Format( - "bundle {0} -o {1} --runtime {2} {3}", + "publish {0} -o {1} --runtime {2} {3}", startParameters.ApplicationPath, - startParameters.BundledApplicationRootPath, + startParameters.PublishedApplicationRootPath, startParameters.Runtime, - startParameters.BundleWithNoSource ? "--no-source" : string.Empty); + startParameters.PublishWithNoSource ? "--no-source" : string.Empty); logger.LogInformation("Executing command dnu {args}", parameters); @@ -320,10 +320,10 @@ namespace E2ETests (startParameters.ServerType == ServerType.IISExpress || startParameters.ServerType == ServerType.IISNativeModule || startParameters.ServerType == ServerType.IIS) ? - Path.Combine(startParameters.BundledApplicationRootPath, "wwwroot") : - Path.Combine(startParameters.BundledApplicationRootPath, "approot", "src", "MusicStore"); + Path.Combine(startParameters.PublishedApplicationRootPath, "wwwroot") : + Path.Combine(startParameters.PublishedApplicationRootPath, "approot", "src", "MusicStore"); - logger.LogInformation("dnu bundle finished with exit code : {exitCode}", hostProcess.ExitCode); + logger.LogInformation("dnu publish finished with exit code : {exitCode}", hostProcess.ExitCode); } public static void CleanUpApplication(StartParameters startParameters, Process hostProcess, string musicStoreDbName, ILogger logger) @@ -381,12 +381,12 @@ namespace E2ETests } } - if (startParameters.BundleApplicationBeforeStart) + if (startParameters.PublishApplicationBeforeStart) { try { - //We've originally bundled the application in a temp folder. We need to delete it. - Directory.Delete(startParameters.BundledApplicationRootPath, true); + //We've originally published the application in a temp folder. We need to delete it. + Directory.Delete(startParameters.PublishedApplicationRootPath, true); } catch (Exception exception) { diff --git a/test/E2ETests/Common/StartParameters.cs b/test/E2ETests/Common/StartParameters.cs index c3d0d570cb..14a85f8143 100644 --- a/test/E2ETests/Common/StartParameters.cs +++ b/test/E2ETests/Common/StartParameters.cs @@ -21,11 +21,11 @@ public string ApplicationPath { get; set; } - public bool BundleApplicationBeforeStart { get; set; } + public bool PublishApplicationBeforeStart { get; set; } - public string BundledApplicationRootPath { get; set; } + public string PublishedApplicationRootPath { get; set; } - public bool BundleWithNoSource { get; set; } + public bool PublishWithNoSource { get; set; } public string Runtime { get; set; } diff --git a/test/E2ETests/PublishAndRunTests.cs b/test/E2ETests/PublishAndRunTests.cs index 51c63e9a6c..4505966640 100644 --- a/test/E2ETests/PublishAndRunTests.cs +++ b/test/E2ETests/PublishAndRunTests.cs @@ -50,8 +50,8 @@ namespace E2ETests ServerType = serverType, RuntimeFlavor = runtimeFlavor, RuntimeArchitecture = architecture, - BundleApplicationBeforeStart = true, - BundleWithNoSource = noSource + PublishApplicationBeforeStart = true, + PublishWithNoSource = noSource }; var stopwatch = Stopwatch.StartNew(); @@ -94,7 +94,7 @@ namespace E2ETests { if (Directory.GetFiles(_startParameters.ApplicationPath, "*.cmd", SearchOption.TopDirectoryOnly).Length > 0) { - throw new Exception("bundleExclude parameter values are not honored."); + throw new Exception("publishExclude parameter values are not honored."); } }