Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change site folder from 'live' to 'site' + cleanup old dev site code

  • Loading branch information...
commit 5c81fe688597554d5ede6485edee1252f2272681 1 parent c0ce035
@davidebbo davidebbo authored
View
7 Kudu.SiteManagement/DefaultPathResolver.cs
@@ -46,12 +46,7 @@ public string GetApplicationPath(string applicationName)
public string GetLiveSitePath(string applicationName)
{
- return Path.Combine(GetApplicationPath(applicationName), "live");
- }
-
- public string GetDeveloperApplicationPath(string applicationName)
- {
- return Path.Combine(GetApplicationPath(applicationName), "dev");
+ return Path.Combine(GetApplicationPath(applicationName), "site");
}
}
}
View
1  Kudu.SiteManagement/IPathResolver.cs
@@ -6,6 +6,5 @@ public interface IPathResolver
string SitesPath { get; }
string GetApplicationPath(string applicationName);
string GetLiveSitePath(string applicationName);
- string GetDeveloperApplicationPath(string applicationName);
}
}
View
2  Kudu.SiteManagement/ISiteManager.cs
@@ -8,6 +8,6 @@ public interface ISiteManager
Site GetSite(string applicationName);
Site CreateSite(string applicationName);
void DeleteSite(string applicationName);
- void SetDeveloperSiteWebRoot(string applicationName, string siteRoot);
+ void SetSiteWebRoot(string applicationName, string siteRoot);
}
}
View
8 Kudu.SiteManagement/SiteManager.cs
@@ -166,14 +166,12 @@ public void DeleteSite(string applicationName)
string appPath = _pathResolver.GetApplicationPath(applicationName);
var sitePath = _pathResolver.GetLiveSitePath(applicationName);
- var devPath = _pathResolver.GetDeveloperApplicationPath(applicationName);
try
{
kuduPool.StopAndWait();
DeleteSafe(sitePath);
- DeleteSafe(devPath);
DeleteSafe(appPath);
}
catch (Exception ex)
@@ -193,7 +191,7 @@ public void DeleteSite(string applicationName)
}
}
- public void SetDeveloperSiteWebRoot(string applicationName, string siteRoot)
+ public void SetSiteWebRoot(string applicationName, string siteRoot)
{
var iis = new IIS.ServerManager();
string siteName = GetDevSite(applicationName);
@@ -201,8 +199,8 @@ public void SetDeveloperSiteWebRoot(string applicationName, string siteRoot)
IIS.Site site = iis.Sites[siteName];
if (site != null)
{
- string devSitePath = _pathResolver.GetDeveloperApplicationPath(applicationName);
- string webRoot = Path.Combine(devSitePath, Constants.WebRoot, siteRoot);
+ string sitePath = _pathResolver.GetLiveSitePath(applicationName);
+ string webRoot = Path.Combine(sitePath, Constants.WebRoot, siteRoot);
// Change the web root
site.Applications[0].VirtualDirectories[0].PhysicalPath = webRoot;

0 comments on commit 5c81fe6

Please sign in to comment.
Something went wrong with that request. Please try again.