From 37ac524e8e6ed987f4b68a67eec2bc45ab97a6ea Mon Sep 17 00:00:00 2001 From: Sebastiaan Jansssen Date: Mon, 5 Feb 2018 22:37:47 +0100 Subject: [PATCH] Don't enable tours for upgraders --- build/NuSpecs/tools/install.ps1 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build/NuSpecs/tools/install.ps1 b/build/NuSpecs/tools/install.ps1 index 0e62fb0749..3a14b2ccd2 100644 --- a/build/NuSpecs/tools/install.ps1 +++ b/build/NuSpecs/tools/install.ps1 @@ -98,10 +98,26 @@ if ($project) { $umbracoUIXMLDestination = Join-Path $projectPath "Umbraco\Config\Create\UI.xml" Copy-Item $umbracoUIXMLSource $umbracoUIXMLDestination -Force } else { + # This part only runs for upgrades + $upgradeViewSource = Join-Path $umbracoFolderSource "Views\install\*" $upgradeView = Join-Path $umbracoFolder "Views\install\" Write-Host "Copying2 ${upgradeViewSource} to ${upgradeView}" Copy-Item $upgradeViewSource $upgradeView -Force + + Try + { + # Disable tours for upgrades, presumably Umbraco experience is already available + $umbracoSettingsConfigPath = Join-Path $configFolder "umbracoSettings.config" + $content = (Get-Content $umbracoSettingsConfigPath).Replace('','') + # Saves with UTF-8 encoding without BOM which makes sure Umbraco can still read it + # Reference: https://stackoverflow.com/a/32951824/5018 + [IO.File]::WriteAllLines($umbracoSettingsConfigPath, $content) + } + Catch + { + # Not a big problem if this fails, let it go + } } $installFolder = Join-Path $projectPath "Install"