Skip to content

Commit 08fc7ef

Browse files
authored
[Eng] Moving generated content when archive instead of copying (#28423)
1 parent e471f24 commit 08fc7ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/BuildScripts/BuildScripts.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ function Update-GeneratedSubModule {
167167
$formatName = Get-ChildItem $SourceDirectory | Where-Object { $_.Name -match "Az\.${subModuleNameTrimmed}\.format\.ps1xml" } | Foreach-Object {$_.Name}
168168
$csprojName = Get-ChildItem $SourceDirectory | Where-Object { $_.Name -match "Az\.${subModuleNameTrimmed}\.csproj" } | Foreach-Object {$_.Name}
169169
$fileToUpdate = @('generated', 'resources', $psd1Name, $psm1Name, $formatName, 'exports', 'internal', 'test-module.ps1', 'check-dependencies.ps1')
170-
# Copy from src/ to generated/
170+
# Move from src/ to generated/
171171
$fileToUpdate | Foreach-Object {
172172
$moveFrom = Join-Path $SourceDirectory $_
173173
$moveTo = Join-Path $GeneratedDirectory $_
174-
Write-Host "Copying $moveFrom to $moveTo ..." -ForegroundColor Cyan
175-
Copy-Item -Path $moveFrom -Destination $moveTo -Recurse -Force
174+
Write-Host "Moving $moveFrom to $moveTo ..." -ForegroundColor Cyan
175+
Move-Item -Path $moveFrom -Destination $moveTo -Force
176176
}
177177
$cSubModuleNameTrimmed = $subModuleNameTrimmed
178178
if ($csprojName -match "^Az\.(?<cSubModuleName>\w+)\.csproj$") {

0 commit comments

Comments
 (0)