Skip to content

Commit d697c59

Browse files
U4-4930 NuGet update fails to copy new Umbraco binaries
1 parent a55cd67 commit d697c59

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

build/NuSpecs/UmbracoCms.Core.nuspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,6 @@
6969
<file src="..\_BuildOutput\WebApp\bin\umbraco.XmlSerializers.dll" target="lib\umbraco.XmlSerializers.dll" />
7070
<file src="..\_BuildOutput\WebApp\bin\UmbracoExamine.dll" target="lib\UmbracoExamine.dll" />
7171
<file src="..\_BuildOutput\WebApp\bin\UrlRewritingNet.UrlRewriter.dll" target="lib\UrlRewritingNet.UrlRewriter.dll" />
72+
<file src="tools\install.core.ps1" target="tools\install.ps1" />
7273
</files>
7374
</package>

build/NuSpecs/tools/install.core.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
param($rootPath, $toolsPath, $package, $project)
2+
3+
if ($project) {
4+
$dateTime = Get-Date -Format yyyyMMdd-HHmmss
5+
$backupPath = Join-Path (Split-Path $project.FullName -Parent) "\App_Data\NuGetBackup\$dateTime"
6+
$copyLogsPath = Join-Path $backupPath "CopyLogs"
7+
$projectDestinationPath = Split-Path $project.FullName -Parent
8+
9+
# Create backup folder and logs folder if it doesn't exist yet
10+
New-Item -ItemType Directory -Force -Path $backupPath
11+
New-Item -ItemType Directory -Force -Path $copyLogsPath
12+
13+
# After backing up, remove all dlls from bin folder in case dll files are included in the VS project
14+
# See: http://issues.umbraco.org/issue/U4-4930
15+
$umbracoBinFolder = Join-Path $projectDestinationPath "bin"
16+
if(Test-Path $umbracoBinFolder) {
17+
$umbracoBinBackupPath = Join-Path $backupPath "bin"
18+
19+
New-Item -ItemType Directory -Force -Path $umbracoBinBackupPath
20+
21+
robocopy $umbracoBinFolder $umbracoBinBackupPath /e /LOG:$copyLogsPath\UmbracoBinBackup.log
22+
Remove-Item $umbracoBinFolder\*.dll -Force -Confirm:$false
23+
}
24+
}

0 commit comments

Comments
 (0)