File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 11function Copy-ProjectResource {
22 $data = Get-MTProjectInfo
33 $resFolder = [System.IO.Path ]::Join($data.ProjectRoot , ' src' , ' resources' )
4-
54 if (Test-Path $resFolder ) {
6- $items = Get-ChildItem - Path $resFolder - ErrorAction SilentlyContinue
7- if ($items ) {
8- Write-Verbose ' Files found in resource folder, copying resource folder content'
9- foreach ($item in $items ) {
10- Copy-Item - Path $item.FullName - Destination ($data.OutputModuleDir ) - Recurse - Force - ErrorAction Stop
5+ if ($data.CopyMode -eq ' Content' ) {
6+ # Copy the resources folder content to the OutputModuleDir
7+ $items = Get-ChildItem - Path $resFolder - ErrorAction SilentlyContinue
8+ if ($items ) {
9+ Write-Verbose ' Files found in resource folder, copying resource folder content'
10+ foreach ($item in $items ) {
11+ Copy-Item - Path $item.FullName - Destination ($data.OutputModuleDir ) - Recurse - Force - ErrorAction Stop
12+ }
13+ }
14+ } else {
15+ # Copy the resources folder to the OutputModuleDir
16+ if (Get-ChildItem $resFolder - ErrorAction SilentlyContinue) {
17+ Write-Verbose ' Files found in resource folder, Copying resource folder'
18+ Copy-Item - Path $resFolder - Destination ($data.OutputModuleDir ) - Recurse - Force - ErrorAction Stop
1119 }
1220 }
1321 }
You can’t perform that action at this time.
0 commit comments