Skip to content

Conversation

VeryEarly
Copy link
Collaborator

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@Copilot Copilot AI review requested due to automatic review settings August 20, 2025 02:25
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR optimizes the build process by changing the file operation from copying to moving when archiving generated content during the build process. This improvement reduces disk I/O and build time by eliminating unnecessary file duplication.

  • Changes file operation from Copy-Item to Move-Item in the Update-GeneratedSubModule function
  • Updates accompanying log message to reflect the operation change
  • Removes the -Recurse parameter as it's not applicable to Move-Item

Write-Host "Copying $moveFrom to $moveTo ..." -ForegroundColor Cyan
Copy-Item -Path $moveFrom -Destination $moveTo -Recurse -Force
Write-Host "Moving $moveFrom to $moveTo ..." -ForegroundColor Cyan
Move-Item -Path $moveFrom -Destination $moveTo -Force
Copy link

Copilot AI Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Move-Item operation should include the -Recurse parameter when moving directories to ensure all subdirectories and files are moved properly. The 'generated' item in the $fileToUpdate array appears to be a directory based on the context.

Suggested change
Move-Item -Path $moveFrom -Destination $moveTo -Force
Move-Item -Path $moveFrom -Destination $moveTo -Force -Recurse

Copilot uses AI. Check for mistakes.

Copy link
Collaborator Author

@VeryEarly VeryEarly Aug 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, Move-Item is recursive by default and there is no parameter -Recurse in Move-Item. Please be smart @copilot

@VeryEarly VeryEarly merged commit 08fc7ef into main Aug 20, 2025
12 checks passed
@VeryEarly VeryEarly deleted the yabo/fix-versioncontroller branch August 20, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants