diff --git a/build/Install.ps1 b/build/Install.ps1 new file mode 100644 index 0000000..03a3225 --- /dev/null +++ b/build/Install.ps1 @@ -0,0 +1,23 @@ +param($installPath, $toolsPath, $package, $project) + +$appPluginsFolder = $project.ProjectItems | Where-Object { $_.Name -eq "App_Plugins" } +$nestedContentFolder = $appPluginsFolder.ProjectItems | Where-Object { $_.Name -eq "NestedContent" } + +if (!$nestedContentFolder) +{ + $newPackageFiles = "$installPath\Content\App_Plugins\NestedContent" + + $projFile = Get-Item ($project.FullName) + $projDirectory = $projFile.DirectoryName + $projectPath = Join-Path $projDirectory -ChildPath "App_Plugins" + $projectPathExists = Test-Path $projectPath + + if ($projectPathExists) { + Write-Host "Updating Nested Content App_Plugin files using PS as they have been excluded from the project" + Copy-Item $newPackageFiles $projectPath -Recurse -Force + } +} + + + + diff --git a/build/package.proj b/build/package.proj index 747d160..cd53a5d 100644 --- a/build/package.proj +++ b/build/package.proj @@ -123,6 +123,7 @@ + @@ -132,7 +133,8 @@ - + + diff --git a/src/Our.Umbraco.NestedContent.sln b/src/Our.Umbraco.NestedContent.sln index 9362de1..d5f896a 100644 --- a/src/Our.Umbraco.NestedContent.sln +++ b/src/Our.Umbraco.NestedContent.sln @@ -16,6 +16,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build Package", "Build Pack ..\appveyor.yml = ..\appveyor.yml ..\build-appveyor.cmd = ..\build-appveyor.cmd ..\build.cmd = ..\build.cmd + ..\build\Install.ps1 = ..\build\Install.ps1 ..\build\package.nuspec = ..\build\package.nuspec ..\build\package.proj = ..\build\package.proj ..\build\package.xml = ..\build\package.xml