From 43c9b8d47bd85d786fe3da668dbed4aa0311aee4 Mon Sep 17 00:00:00 2001 From: Amit Apple Date: Thu, 1 Nov 2012 19:34:27 -0700 Subject: [PATCH] We need to supply both the previous and next manifest to the custom deloyment for smart copy to work properly. --- Kudu.Core/Deployment/CustomBuilder.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Kudu.Core/Deployment/CustomBuilder.cs b/Kudu.Core/Deployment/CustomBuilder.cs index cb0575e72..609eaeb09 100644 --- a/Kudu.Core/Deployment/CustomBuilder.cs +++ b/Kudu.Core/Deployment/CustomBuilder.cs @@ -16,7 +16,8 @@ public class CustomBuilder : ISiteBuilder private const string SourcePath = "DEPLOYMENT_SOURCE"; private const string TargetPath = "DEPLOYMENT_TARGET"; private const string BuildTempPath = "DEPLOYMENT_TEMP"; - private const string ManifestPath = "MANIFEST_PATH"; + private const string PreviousManifestPath = "PREVIOUS_MANIFEST_PATH"; + private const string CurrentManifestPath = "CURRENT_MANIFEST_PATH"; private const string MSBuildPath = "MSBUILD_PATH"; public CustomBuilder(string repositoryPath, string tempPath, string command, IBuildPropertyProvider propertyProvider) @@ -38,7 +39,8 @@ public Task Build(DeploymentContext context) var exe = new Executable("cmd", _repositoryPath); exe.EnvironmentVariables[SourcePath] = _repositoryPath; exe.EnvironmentVariables[TargetPath] = context.OutputPath; - exe.EnvironmentVariables[ManifestPath] = context.PreviousMainfest.ManifestFilePath; + exe.EnvironmentVariables[PreviousManifestPath] = (context.PreviousMainfest != null) ? context.PreviousMainfest.ManifestFilePath : string.Empty; + exe.EnvironmentVariables[CurrentManifestPath] = context.ManifestWriter.ManifestFilePath; exe.EnvironmentVariables[MSBuildPath] = PathUtility.ResolveMSBuildPath(); exe.EnvironmentVariables[WellKnownEnvironmentVariables.NuGetPackageRestoreKey] = "true";