diff --git a/Hhogdev.SitecorePackageDeployer_v1.1.update b/Hhogdev.SitecorePackageDeployer_v1.1.update deleted file mode 100644 index ad284e7..0000000 Binary files a/Hhogdev.SitecorePackageDeployer_v1.1.update and /dev/null differ diff --git a/Hhogdev.SitecorePackageDeployer_v1.2.update b/Hhogdev.SitecorePackageDeployer_v1.2.update new file mode 100644 index 0000000..5b9e1f6 Binary files /dev/null and b/Hhogdev.SitecorePackageDeployer_v1.2.update differ diff --git a/SitecorePackageDeployer.TDS/Hhogdev.SitecorePackageDeployer.TDS.scproj b/SitecorePackageDeployer.TDS/Hhogdev.SitecorePackageDeployer.TDS.scproj index 5012a2e..8ea02c0 100644 --- a/SitecorePackageDeployer.TDS/Hhogdev.SitecorePackageDeployer.TDS.scproj +++ b/SitecorePackageDeployer.TDS/Hhogdev.SitecorePackageDeployer.TDS.scproj @@ -36,7 +36,7 @@ Charles Turano Hedgehog Development Installs packages using a folder - 1.0 + 1.2 ..\packages\SitecoreKernel.7.0.0.131127\lib diff --git a/SitecorePackageDeployer/Tasks/InstallPackage.cs b/SitecorePackageDeployer/Tasks/InstallPackage.cs index 3cd66ae..c33bd47 100644 --- a/SitecorePackageDeployer/Tasks/InstallPackage.cs +++ b/SitecorePackageDeployer/Tasks/InstallPackage.cs @@ -295,11 +295,14 @@ internal static void ExecutePostSteps(PostStepDetails postStepDetails) /// private void FindAndUpdateChangedConfigs(string installPackageName) { - string appConfigFolder = MainUtil.MapPath("/App_Config"); + string appConfigFolder = MainUtil.MapPath("/"); foreach (string newConfigFile in Directory.GetFiles(appConfigFolder, "*.config." + installPackageName, SearchOption.AllDirectories)) { - string oldConfigFile = Path.Combine(Path.GetDirectoryName(newConfigFile), Path.GetFileNameWithoutExtension(newConfigFile)); + Log.Info(string.Format("Found changed config {0}", newConfigFile), this); + + int configExtensionPos = newConfigFile.LastIndexOf(".config") + 7; + string oldConfigFile = Path.Combine(Path.GetDirectoryName(newConfigFile), newConfigFile.Substring(0, configExtensionPos)); string backupConfigFile = newConfigFile + string.Format(".backup{0:yyyyMMddhhmmss}", DateTime.Now); //Backup the existing config file @@ -310,9 +313,13 @@ private void FindAndUpdateChangedConfigs(string installPackageName) File.Delete(backupConfigFile); } + Log.Info(string.Format("Backing up config file {0} as {1}", oldConfigFile, backupConfigFile), this); + File.Move(oldConfigFile, backupConfigFile); } + Log.Info(string.Format("Copying new config file from {0} to {1}", newConfigFile, oldConfigFile), this); + //Move the new file into place File.Copy(newConfigFile, oldConfigFile); diff --git a/TestUpdatePackage.Web/App_Config/Include/NewConfig1.config b/TestUpdatePackage.Web/App_Config/Include/NewConfig1.config index fe8fa86..ebd4c90 100644 --- a/TestUpdatePackage.Web/App_Config/Include/NewConfig1.config +++ b/TestUpdatePackage.Web/App_Config/Include/NewConfig1.config @@ -1,5 +1,5 @@  - + diff --git a/TestUpdatePackage.Web/App_Config/Include/TestPatch.config b/TestUpdatePackage.Web/App_Config/Include/TestPatch.config index da2fe9e..ea1d843 100644 --- a/TestUpdatePackage.Web/App_Config/Include/TestPatch.config +++ b/TestUpdatePackage.Web/App_Config/Include/TestPatch.config @@ -1,6 +1,6 @@  - + diff --git a/TestUpdatePackage.Web/App_Config/NewConfig2.config b/TestUpdatePackage.Web/App_Config/NewConfig2.config index 1c60c8c..7864dff 100644 --- a/TestUpdatePackage.Web/App_Config/NewConfig2.config +++ b/TestUpdatePackage.Web/App_Config/NewConfig2.config @@ -1,6 +1,6 @@  - + diff --git a/TestUpdatePackage/TestUpdatePackage.scproj b/TestUpdatePackage/TestUpdatePackage.scproj index 57a46a9..9d47bd1 100644 --- a/TestUpdatePackage/TestUpdatePackage.scproj +++ b/TestUpdatePackage/TestUpdatePackage.scproj @@ -33,7 +33,7 @@ True False False - False + True Charles Turano Hedgehog Development This package tests the package deployer