diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec index 84d60e4fd4..0053fe6ef5 100644 --- a/build/NuSpecs/UmbracoCms.nuspec +++ b/build/NuSpecs/UmbracoCms.nuspec @@ -19,8 +19,6 @@ - - @@ -34,9 +32,8 @@ - - - + + diff --git a/build/NuSpecs/build/net40/UmbracoCms.targets b/build/NuSpecs/build/net40/UmbracoCms.targets index f4fb27ba8c..0a172d4d90 100644 --- a/build/NuSpecs/build/net40/UmbracoCms.targets +++ b/build/NuSpecs/build/net40/UmbracoCms.targets @@ -1,28 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + - - - + + App_Browsers\%(RecursiveDir)%(Filename)%(Extension) + + + App_Code\%(RecursiveDir)%(Filename)%(Extension) + + + App_Plugins\%(RecursiveDir)%(Filename)%(Extension) + + + %(RecursiveDir)%(Filename)%(Extension) + + + bin\amd64\%(RecursiveDir)%(Filename)%(Extension) + + + bin\x86\%(RecursiveDir)%(Filename)%(Extension) + + + Config\Splashes\%(RecursiveDir)%(Filename)%(Extension) + umbraco\%(RecursiveDir)%(Filename)%(Extension) umbraco_client\%(RecursiveDir)%(Filename)%(Extension) - - App_Browsers\%(RecursiveDir)%(Filename)%(Extension) - - - %(RecursiveDir)%(Filename)%(Extension) - - - Config\Splashes\%(RecursiveDir)%(Filename)%(Extension) - \ No newline at end of file diff --git a/build/NuSpecs/build/net45/UmbracoCms.targets b/build/NuSpecs/build/net45/UmbracoCms.targets index f4fb27ba8c..0a172d4d90 100644 --- a/build/NuSpecs/build/net45/UmbracoCms.targets +++ b/build/NuSpecs/build/net45/UmbracoCms.targets @@ -1,28 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + - - - + + App_Browsers\%(RecursiveDir)%(Filename)%(Extension) + + + App_Code\%(RecursiveDir)%(Filename)%(Extension) + + + App_Plugins\%(RecursiveDir)%(Filename)%(Extension) + + + %(RecursiveDir)%(Filename)%(Extension) + + + bin\amd64\%(RecursiveDir)%(Filename)%(Extension) + + + bin\x86\%(RecursiveDir)%(Filename)%(Extension) + + + Config\Splashes\%(RecursiveDir)%(Filename)%(Extension) + umbraco\%(RecursiveDir)%(Filename)%(Extension) umbraco_client\%(RecursiveDir)%(Filename)%(Extension) - - App_Browsers\%(RecursiveDir)%(Filename)%(Extension) - - - %(RecursiveDir)%(Filename)%(Extension) - - - Config\Splashes\%(RecursiveDir)%(Filename)%(Extension) - \ No newline at end of file diff --git a/build/NuSpecs/build/net451/UmbracoCms.targets b/build/NuSpecs/build/net451/UmbracoCms.targets index f4fb27ba8c..0a172d4d90 100644 --- a/build/NuSpecs/build/net451/UmbracoCms.targets +++ b/build/NuSpecs/build/net451/UmbracoCms.targets @@ -1,28 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + - - - + + App_Browsers\%(RecursiveDir)%(Filename)%(Extension) + + + App_Code\%(RecursiveDir)%(Filename)%(Extension) + + + App_Plugins\%(RecursiveDir)%(Filename)%(Extension) + + + %(RecursiveDir)%(Filename)%(Extension) + + + bin\amd64\%(RecursiveDir)%(Filename)%(Extension) + + + bin\x86\%(RecursiveDir)%(Filename)%(Extension) + + + Config\Splashes\%(RecursiveDir)%(Filename)%(Extension) + umbraco\%(RecursiveDir)%(Filename)%(Extension) umbraco_client\%(RecursiveDir)%(Filename)%(Extension) - - App_Browsers\%(RecursiveDir)%(Filename)%(Extension) - - - %(RecursiveDir)%(Filename)%(Extension) - - - Config\Splashes\%(RecursiveDir)%(Filename)%(Extension) - \ No newline at end of file diff --git a/build/NuSpecs/tools/Readme.txt b/build/NuSpecs/tools/Readme.txt index 939ea026b6..86f8a832d7 100644 --- a/build/NuSpecs/tools/Readme.txt +++ b/build/NuSpecs/tools/Readme.txt @@ -1,8 +1,11 @@ A note about running Umbraco from Visual Studio. -When upgrading your website using NuGet, make sure to backup all of your config files and web.config. +When upgrading your website using NuGet you should answer "No" to the questions to overwrite the Web.config +file (and config files in the config folder). +We will overwrite Web.config anyway but we keep a backup in the App_Data\ConfigBackup folder. There you'll +find a folder with the current date and time in which the backup has been placed. Make sure to merge the +new file with the old backup files before you proceed. Only the web.config will be overwritten by default to ensure that it has the necessary settings from the current release. -This means that you'll have to merge the files if you made any changes to the previous config files. The config files found in the config folder will usually not be changed for patch releases, so they can usually be skipped, but the web.config will have to have its previous "umbracoConfigurationStatus"-appsetting and "umbracoDbDSN" connection string diff --git a/build/NuSpecs/tools/install.ps1 b/build/NuSpecs/tools/install.ps1 index aaba10d364..366045ba32 100644 --- a/build/NuSpecs/tools/install.ps1 +++ b/build/NuSpecs/tools/install.ps1 @@ -1,10 +1,20 @@ param($rootPath, $toolsPath, $package, $project) if ($project) { - # Copy umbraco files from package to project folder + $dateTime = Get-Date -Format yyyyMMdd-HHmmss + $backupPath = Join-Path (Split-Path $project.FullName -Parent) "\App_Data\ConfigBackup\$dateTime" + + # Create backup folder if it doesn't exist yet + New-Item -ItemType Directory -Force -Path $backupPath + + # Create a backup of original web.config $projectDestinationPath = Split-Path $project.FullName -Parent - $umbracoFilesPath = Join-Path $rootPath "UmbracoFiles\*" - Copy-Item $umbracoFilesPath $projectDestinationPath -recurse -force + $webConfigSource = Join-Path $projectDestinationPath "Web.config" + Copy-Item $webConfigSource $backupPath -Force + + # Copy Web.config from package to project folder + $umbracoFilesPath = Join-Path $rootPath "UmbracoFiles\Web.config" + Copy-Item $umbracoFilesPath $projectDestinationPath -Force # Open readme.txt file $DTE.ItemOperations.OpenFile($toolsPath + '\Readme.txt')