Skip to content

Commit

Permalink
We need to supply both the previous and next manifest to the custom d…
Browse files Browse the repository at this point in the history
…eloyment for smart copy to work properly.
  • Loading branch information
Amit Apple committed Nov 7, 2012
1 parent 393335b commit 43c9b8d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Kudu.Core/Deployment/CustomBuilder.cs
Expand Up @@ -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)
Expand All @@ -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";

Expand Down

0 comments on commit 43c9b8d

Please sign in to comment.