Consolidate download build scripts into shared utility#6271
Draft
guimafelipe wants to merge 1 commit intomainfrom
Draft
Consolidate download build scripts into shared utility#6271guimafelipe wants to merge 1 commit intomainfrom
guimafelipe wants to merge 1 commit intomainfrom
Conversation
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates three nearly identical download scripts into a shared
Download-Package.ps1utility, reducing code duplication in the build infrastructure.Changes
build/scripts/Download-Package.ps1— shared download utility withCmdletBinding, comment-based help, parameter validation, and proper error handling (try/catch with exit codes)DownloadVCLibsDesktop.ps1,DownloadVCRedistInstaller.ps1,DownloadDotNetRuntimeInstaller.ps1— converted to thin wrappers that resolve their component-specific URL/filename and delegate toDownload-Package.ps1Why
The three download scripts had identical structure (create output dir → build URL → skip if exists → download via
Invoke-WebRequest). Any bug fix or improvement had to be applied three times. Now the common logic lives in one place.Backward Compatibility
The three wrapper scripts preserve their original
-Platform/-OutputDirectoryparameter interface, so the pipeline YAML (WindowsAppSDK-SetupBuildEnvironment-Steps.yml) requires no changes.