Browse files

Remove obsolete NugetCachePath setting

  • Loading branch information...
1 parent 56c01c6 commit 35d52b9c369f2f3a5bab28472afe6eb806f3bfc1 @davidebbo davidebbo committed Dec 11, 2012
View
6 Kudu.Console/Program.cs
@@ -46,9 +46,8 @@ static int Main(string[] args)
var appRoot = args[0];
var wapTargets = args[1];
string deployer = args.Length == 2 ? null : args[2];
- string nugetCachePath = null;
- IEnvironment env = GetEnvironment(appRoot, nugetCachePath);
+ IEnvironment env = GetEnvironment(appRoot);
var settings = new XmlSettings.Settings(GetSettingsPath(env));
var settingsManager = new DeploymentSettingsManager(settings);
@@ -146,7 +145,7 @@ private static string GetSettingsPath(IEnvironment environment)
return Path.Combine(environment.DeploymentCachePath, Constants.DeploySettingsPath);
}
- private static IEnvironment GetEnvironment(string siteRoot, string nugetCachePath)
+ private static IEnvironment GetEnvironment(string siteRoot)
{
string root = Path.GetFullPath(Path.Combine(siteRoot, ".."));
string webRootPath = Path.Combine(siteRoot, Constants.WebRoot);
@@ -168,7 +167,6 @@ private static IEnvironment GetEnvironment(string siteRoot, string nugetCachePat
deployCachePath,
diagnosticsPath,
sshKeyPath,
- nugetCachePath,
scriptPath);
}
}
View
1 Kudu.Contracts/IEnvironment.cs
@@ -10,7 +10,6 @@ public interface IEnvironment
string DeploymentCachePath { get; } // e.g. /site/deployments
string DiagnosticsPath { get; } // e.g. /site/diagnostics
string SSHKeyPath { get; }
- string NuGetCachePath { get; }
string TempPath { get; }
string ScriptPath { get; }
string TracePath { get; } // e.g. /logfiles/git/trace
View
10 Kudu.Core.Test/Deployment/WapBuilderFacts.cs
@@ -15,7 +15,7 @@ public void BuildProjectAppendsBuildPropertiesToExec()
var settings = new Mock<IDeploymentSettingsManager>();
var buildPropertyProvider = new Mock<IBuildPropertyProvider>();
buildPropertyProvider.Setup(s => s.GetProperties()).Returns(new Dictionary<string, string> {{ "ExtensionsPath", @"C:\Program Files" }, {"flp", "Detailed" }});
- var wapBuilder = new WapBuilder(settings.Object, buildPropertyProvider.Object, @"x:\source-path", @"x:\project-path", @"x:\temp-path", @"x:\nuget-cache-path", @"x:\solution-dir\sol-path");
+ var wapBuilder = new WapBuilder(settings.Object, buildPropertyProvider.Object, @"x:\source-path", @"x:\project-path", @"x:\temp-path", @"x:\solution-dir\sol-path");
// Act
var commandLineParams = wapBuilder.GetMSBuildArguments(@"x:\temp-path\some-guid");
@@ -32,7 +32,7 @@ public void BuildProjectAppendsBuildPropertiesAndExtraArgumentsToExec()
settings.Setup(s => s.GetValue(SettingsKeys.BuildArgs)).Returns("/extra_arg1 /extra_arg2");
var buildPropertyProvider = new Mock<IBuildPropertyProvider>();
buildPropertyProvider.Setup(s => s.GetProperties()).Returns(new Dictionary<string, string> { { "ExtensionsPath", @"C:\Program Files" }, { "flp", "Detailed" } });
- var wapBuilder = new WapBuilder(settings.Object, buildPropertyProvider.Object, @"x:\source-path", @"x:\project-path", @"x:\temp-path", @"x:\nuget-cache-path", @"x:\solution-dir\sol-path");
+ var wapBuilder = new WapBuilder(settings.Object, buildPropertyProvider.Object, @"x:\source-path", @"x:\project-path", @"x:\temp-path", @"x:\solution-dir\sol-path");
// Act
var commandLineParams = wapBuilder.GetMSBuildArguments(@"x:\temp-path\some-guid");
@@ -49,7 +49,7 @@ public void BuildProjectAppendsExtraArgumentsToExec()
settings.Setup(s => s.GetValue(SettingsKeys.BuildArgs)).Returns("/extra_arg1 /extra_arg2");
var buildPropertyProvider = new Mock<IBuildPropertyProvider>();
buildPropertyProvider.Setup(s => s.GetProperties()).Returns(new Dictionary<string, string>(0));
- var wapBuilder = new WapBuilder(settings.Object, buildPropertyProvider.Object, @"x:\source-path", @"x:\project-path", @"x:\temp-path", @"x:\nuget-cache-path", @"x:\solution-dir\sol-path");
+ var wapBuilder = new WapBuilder(settings.Object, buildPropertyProvider.Object, @"x:\source-path", @"x:\project-path", @"x:\temp-path", @"x:\solution-dir\sol-path");
// Act
var commandLineParams = wapBuilder.GetMSBuildArguments(@"x:\temp-path\some-guid");
@@ -65,7 +65,7 @@ public void BuildProjectDoesNotAppendPropertyProviderProperties()
var settings = new Mock<IDeploymentSettingsManager>();
var buildPropertyProvider = new Mock<IBuildPropertyProvider>();
buildPropertyProvider.Setup(s => s.GetProperties()).Returns(new Dictionary<string, string>(0));
- var wapBuilder = new WapBuilder(settings.Object, buildPropertyProvider.Object, @"x:\source-path", @"x:\project-path", @"x:\temp-path", @"x:\nuget-cache-path", @"x:\solution-dir\sol-path");
+ var wapBuilder = new WapBuilder(settings.Object, buildPropertyProvider.Object, @"x:\source-path", @"x:\project-path", @"x:\temp-path", @"x:\solution-dir\sol-path");
// Act
var commandLineParams = wapBuilder.GetMSBuildArguments(@"x:\temp-path\some-guid");
@@ -83,7 +83,7 @@ public void BuildProjectDoesNotAppendSolutionDirIfSolutionPathIsNullOrEmpty(stri
var settings = new Mock<IDeploymentSettingsManager>();
var buildPropertyProvider = new Mock<IBuildPropertyProvider>();
buildPropertyProvider.Setup(s => s.GetProperties()).Returns(new Dictionary<string, string>(0));
- var wapBuilder = new WapBuilder(settings.Object, buildPropertyProvider.Object, @"x:\source-path", @"x:\project-path", @"x:\temp-path", @"x:\nuget-cache-path", solutionPath);
+ var wapBuilder = new WapBuilder(settings.Object, buildPropertyProvider.Object, @"x:\source-path", @"x:\project-path", @"x:\temp-path", solutionPath);
// Act
var commandLineParams = wapBuilder.GetMSBuildArguments(@"x:\temp-path\some-guid");
View
6 Kudu.Core.Test/Infrastructure/EnvironmentFacts.cs
@@ -15,7 +15,7 @@ public void ConstructorThrowsIfFileSystemIsNull()
{
// Act and Assert
var ex = Assert.Throws<ArgumentNullException>(() =>
- new Environment(null, null, null, null, null, null, null, null, null, null, null));
+ new Environment(null, null, null, null, null, null, null, null, null, null));
Assert.Equal("fileSystem", ex.ParamName);
}
@@ -25,7 +25,7 @@ public void ConstructorThrowsIfRepositoryPathResolverIsNull()
{
// Act and Assert
var ex = Assert.Throws<ArgumentNullException>(() =>
- new Environment(Mock.Of<IFileSystem>(), null, null, null, null, null, null, null, null, null, null));
+ new Environment(Mock.Of<IFileSystem>(), null, null, null, null, null, null, null, null, null));
Assert.Equal("repositoryPath", ex.ParamName);
}
@@ -158,7 +158,6 @@ public void GitDisabledTest()
string deployCachePath = null,
string diagnosticsPath = null,
string sshKeyPath = null,
- string nugetCachePath = null,
string scriptPath = null)
{
fileSystem = fileSystem ?? Mock.Of<IFileSystem>();
@@ -174,7 +173,6 @@ public void GitDisabledTest()
deployCachePath,
diagnosticsPath,
sshKeyPath,
- nugetCachePath,
scriptPath);
}
}
View
2 Kudu.Core.Test/Infrastructure/MsBuildSiteBuilderFacts.cs
@@ -43,7 +43,7 @@ public static IEnumerable<object[]> GetPropertyStringData
private class MsBuildSiteBuilderTest : MsBuildSiteBuilder
{
public MsBuildSiteBuilderTest(BuildPropertyProviderTest buildPropertyProviderTest)
- : base(buildPropertyProviderTest, Path.GetTempPath(), Path.GetTempPath(), Path.GetTempPath())
+ : base(buildPropertyProviderTest, Path.GetTempPath(), Path.GetTempPath())
{
}
View
11 Kudu.Core/Deployment/MsBuildSiteBuilder.cs
@@ -9,27 +9,22 @@ namespace Kudu.Core.Deployment
{
public abstract class MsBuildSiteBuilder : ISiteBuilder
{
- private const string NuGetCachePathKey = "NuGetCachePath";
-
private readonly Executable _msbuildExe;
private readonly IDeploymentSettingsManager _settings;
private readonly IBuildPropertyProvider _propertyProvider;
private readonly string _tempPath;
- public MsBuildSiteBuilder(IBuildPropertyProvider propertyProvider, string workingDirectory, string tempPath, string nugetCachePath)
- : this(null, propertyProvider, workingDirectory, tempPath, nugetCachePath)
+ public MsBuildSiteBuilder(IBuildPropertyProvider propertyProvider, string workingDirectory, string tempPath)
+ : this(null, propertyProvider, workingDirectory, tempPath)
{
}
- public MsBuildSiteBuilder(IDeploymentSettingsManager settings, IBuildPropertyProvider propertyProvider, string workingDirectory, string tempPath, string nugetCachePath)
+ public MsBuildSiteBuilder(IDeploymentSettingsManager settings, IBuildPropertyProvider propertyProvider, string workingDirectory, string tempPath)
{
_settings = settings;
_propertyProvider = propertyProvider;
_msbuildExe = new Executable(PathUtility.ResolveMSBuildPath(), workingDirectory);
- // Disable this for now
- // _msbuildExe.EnvironmentVariables[NuGetCachePathKey] = nugetCachePath;
-
// NuGet.exe 1.8 will require an environment variable to make package restore work
_msbuildExe.EnvironmentVariables[WellKnownEnvironmentVariables.NuGetPackageRestoreKey] = "true";
View
4 Kudu.Core/Deployment/SiteBuilderFactory.cs
@@ -86,15 +86,13 @@ public ISiteBuilder CreateBuilder(ITracer tracer, ILogger logger)
repositoryRoot,
project.AbsolutePath,
_environment.TempPath,
- _environment.NuGetCachePath,
solution.Path);
}
return new WebSiteBuilder(_propertyProvider,
repositoryRoot,
project.AbsolutePath,
_environment.TempPath,
- _environment.NuGetCachePath,
solution.Path);
}
@@ -142,7 +140,6 @@ private ISiteBuilder ResolveProject(string repositoryRoot, string targetPath, bo
repositoryRoot,
targetPath,
_environment.TempPath,
- _environment.NuGetCachePath,
solutions[0].Path);
}
}
@@ -178,7 +175,6 @@ private ISiteBuilder DetermineProject(string repositoryRoot, string targetPath)
repositoryRoot,
targetPath,
_environment.TempPath,
- _environment.NuGetCachePath,
solutionPath);
}
View
4 Kudu.Core/Deployment/SolutionBasedSiteBuilder.cs
@@ -17,8 +17,8 @@ public string SolutionDir
public string SolutionPath { get; private set; }
- public SolutionBasedSiteBuilder(IBuildPropertyProvider propertyProvider, string repositoryPath, string tempPath, string nugetCachePath, string solutionPath)
- : base(propertyProvider, repositoryPath, tempPath, nugetCachePath)
+ public SolutionBasedSiteBuilder(IBuildPropertyProvider propertyProvider, string repositoryPath, string tempPath, string solutionPath)
+ : base(propertyProvider, repositoryPath, tempPath)
{
SolutionPath = solutionPath;
}
View
4 Kudu.Core/Deployment/WapBuilder.cs
@@ -15,8 +15,8 @@ public class WapBuilder : MsBuildSiteBuilder
private readonly string _tempPath;
private readonly string _solutionPath;
- public WapBuilder(IDeploymentSettingsManager settings, IBuildPropertyProvider propertyProvider, string sourcePath, string projectPath, string tempPath, string nugetCachePath, string solutionPath)
- : base(settings, propertyProvider, sourcePath, tempPath, nugetCachePath)
+ public WapBuilder(IDeploymentSettingsManager settings, IBuildPropertyProvider propertyProvider, string sourcePath, string projectPath, string tempPath, string solutionPath)
+ : base(settings, propertyProvider, sourcePath, tempPath)
{
_projectPath = projectPath;
_tempPath = tempPath;
View
4 Kudu.Core/Deployment/WebSiteBuilder.cs
@@ -8,8 +8,8 @@ public class WebSiteBuilder : SolutionBasedSiteBuilder
{
private readonly string _projectPath;
- public WebSiteBuilder(IBuildPropertyProvider propertyProvider, string sourcePath, string projectPath, string tempPath, string nugetCachePath, string solutionPath)
- : base(propertyProvider, sourcePath, tempPath, nugetCachePath, solutionPath)
+ public WebSiteBuilder(IBuildPropertyProvider propertyProvider, string sourcePath, string projectPath, string tempPath, string solutionPath)
+ : base(propertyProvider, sourcePath, tempPath, solutionPath)
{
_projectPath = projectPath;
}
View
8 Kudu.Core/Environment.cs
@@ -28,7 +28,6 @@ public class Environment : IEnvironment
string deployCachePath,
string diagnosticsPath,
string sshKeyPath,
- string nugetCachePath,
string scriptPath)
{
if (fileSystem == null)
@@ -49,7 +48,6 @@ public class Environment : IEnvironment
_deployCachePath = deployCachePath;
_diagnosticsPath = diagnosticsPath;
_sshKeyPath = sshKeyPath;
- NuGetCachePath = nugetCachePath;
_scriptPath = scriptPath;
_tracePath = Path.Combine(rootPath, Constants.TracePath);
_deploymentTracePath = Path.Combine(rootPath, Constants.DeploymentTracePath);
@@ -120,12 +118,6 @@ public string TempPath
}
}
- public string NuGetCachePath
- {
- get;
- private set;
- }
-
public string ScriptPath
{
get
View
9 Kudu.Services.Web/AppSettings.cs
@@ -9,7 +9,6 @@ public static class AppSettings
{
private const string BlockLocalRequests = "kudu.blockLocalRequests";
private const string DisableGitKey = "kudu.disableGit";
- private const string NuGetCachePathKey = "nuget.cache";
private const string GitUsernameKey = "git.username";
private const string GitEmailKey = "git.email";
@@ -37,14 +36,6 @@ public static string GitEmail
}
}
- public static string NuGetCachePath
- {
- get
- {
- return GetValue<string>(NuGetCachePathKey);
- }
- }
-
public static bool DisableGit
{
get
View
1 Kudu.Services.Web/App_Start/NinjectServices.cs
@@ -345,7 +345,6 @@ private static IEnvironment GetEnvironment()
deployCachePath,
diagnosticsPath,
sshKeyPath,
- AppSettings.NuGetCachePath,
scriptPath);
}
View
1 Kudu.Services.Web/Web.config
@@ -7,7 +7,6 @@
<appSettings>
<add key="kudu.traceLevel" value="1" />
<add key="kudu.blockLocalRequests" value="false" />
- <add key="nuget.cache" value="c:\NuGetCache" />
<add key="git.username" value="kudu" />
<add key="git.email" value="kudu" />
<add key="webpages:Enabled" value="false" />

0 comments on commit 35d52b9

Please sign in to comment.