public void RunPostDeployAction(XDocument deployedItems, IPostDeployActionHost host, string parameter) { host.LogMessage("Smart publishing master to web"); PublishManager.PublishSmart(Sitecore.Data.Database.GetDatabase("master"), new [] { Sitecore.Data.Database.GetDatabase("web") }, new [] { LanguageManager.GetLanguage("en") }); }
public void RunPostDeployAction(XDocument deployedItems, IPostDeployActionHost host, string parameter) { var databases = this.GetDatabases(parameter); foreach (string targetDatabase in databases) { host.LogMessage("Smart publishing master to " + targetDatabase); PublishManager.PublishSmart(Sitecore.Data.Database.GetDatabase("master"), new[] { Sitecore.Data.Database.GetDatabase(targetDatabase.Trim()) }, new[] { LanguageManager.GetLanguage("en") }); } }
public void RunPostDeployAction(XDocument deployedItems, IPostDeployActionHost host, string parameter) { var databases = this.GetDatabases(parameter); foreach (string databaseName in databases) { Database database = Sitecore.Data.Database.GetDatabase(databaseName.Trim()); if (database == null) { host.LogMessage("Database with the name '{0}' in null", databaseName); continue; } Sitecore.Globals.LinkDatabase.Rebuild(database); } }
public void RunPostDeployAction(XDocument deployedItems, IPostDeployActionHost host, string parameter) { string[] indexNames = this.GetContentSearchIndexes(parameter); foreach (var indexName in indexNames) { var index = ContentSearchManager.GetIndex(indexName.Trim()); if (index == null) { host.LogMessage("The Content Search Index with name {0} supplied does not exist.", indexName); continue; } host.LogMessage("Rebuilding index {0}...", indexName); IndexCustodian.FullRebuild(index, true); host.LogMessage("Rebuild of index {0} complete", indexName); } }
public void RunPostDeployAction(XDocument deployedItems, IPostDeployActionHost host, string parameter) { string[] indexNames = this.GetContentSearchIndexes(parameter); foreach (var indexName in indexNames) { if (!ContentSearchManager.Indexes.Any(x => x.Name == indexName)) { host.LogMessage("The Content Search Index with name {0} supplied does not exist.", indexName); continue; } host.LogMessage("Rebuilding index {0}...", indexName); var Index = ContentSearchManager.GetIndex(indexName); Index.Rebuild(); host.LogMessage("Rebuild of index {0} complete", indexName); } }