Skip to content
This repository was archived by the owner on Jun 18, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions build/Install.ps1
Original file line number Diff line number Diff line change
@@ -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
}
}




4 changes: 3 additions & 1 deletion build/package.proj
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
<PluginFiles Include="$(CoreProjectDir)\Web\UI\**\*.*" />
<PackageFile Include="$(MSBuildProjectDirectory)\package.xml" />
<NuSpecFile Include="$(MSBuildProjectDirectory)\package.nuspec" />
<InstallPsFile Include="$(MSBuildProjectDirectory)\Install.ps1" />
</ItemGroup>
<Copy SourceFiles="@(BinFiles)" DestinationFolder="$(BuildUmbDir)\bin" />
<Copy SourceFiles="@(PackageFile)" DestinationFolder="$(BuildUmbDir)" />
Expand All @@ -132,7 +133,8 @@
<Copy SourceFiles="@(PluginFiles)" DestinationFiles="@(PluginFiles->'$(BuildNuGetDir)\Content\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(SrcFiles)" DestinationFiles="@(SrcFiles->'$(BuildNuGetDir)\src\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(NuSpecFile)" DestinationFolder="$(BuildNuGetDir)" />
</Target>
<Copy SourceFiles="@(InstallPsFile)" DestinationFolder="$(BuildNuGetDir)\tools" />
</Target>

<!-- MANIFEST UMBRACO -->
<Target Name="ManifestUmbraco" DependsOnTargets="PrepareFiles">
Expand Down
1 change: 1 addition & 0 deletions src/Our.Umbraco.NestedContent.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down