-
Notifications
You must be signed in to change notification settings - Fork 694
[release/9.4] Backporting a few get-aspire-cli script PRs #10586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
(cherry picked from commit 0567c27)
## Key Changes ### 1. **Quality Level Behavior** - **`dev`**: Downloads latest development builds from the `main` branch - **`staging`**: Downloads release candidate builds (rc/daily) - **`ga`**: Downloads generally available release builds (ga/daily) - **Default**: `staging` quality is used when no quality is specified ### 2. **Updated URL Mappings for Quality Levels** - **PowerShell Script (`get-aspire-cli.ps1`)**: - `dev` quality now maps to: `https://aka.ms/dotnet/9/aspire/daily` - `staging` quality now maps to: `https://aka.ms/dotnet/9/aspire/rc/daily` - `ga` quality now maps to: `https://aka.ms/dotnet/9/aspire/ga/daily` - **Bash Script (`get-aspire-cli.sh`)**: - Updated with corresponding URL mappings to match PowerShell script - Consistent quality-to-URL mapping across both script implementations ### 3. **Support for -WhatIf and --dry-run** - This will be useful for testing ### 4. **Code Quality Improvements** The code has been made more idiomatic in many ways: - Better PowerShell coding practices and conventions - Improved error handling patterns - Enhanced cross-platform compatibility - More robust parameter validation - Cleaner function organization and separation of concerns Co-authored-by: Copilot <[email protected]> (cherry picked from commit a5d2813)
* [cli scripts] Fix ps1 -Help which failed because it called WriteMessage before it was defined in the file * Update the URLs to use aka.ms links * cleanup - set the default quality in one place * Update docs/using-latest-daily.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> (cherry picked from commit f8c4759)
There was a problem hiding this 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 backports several improvements to the Aspire CLI download scripts, updating them to use new Quality mappings and fixing various issues. The main changes include updating the URL construction logic to use quality-based aka.ms URLs instead of version-based ones, adding new dry-run functionality, improving error handling, and updating documentation to reflect the new quality options.
- Updates URL construction to use new Quality mappings (dev, staging, release) with aka.ms URLs
- Adds dry-run functionality and enhanced error handling to both shell and PowerShell scripts
- Updates documentation to reflect the new quality options and installation instructions
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
eng/scripts/get-aspire-cli.sh | Major refactoring with new URL construction, dry-run support, and improved argument validation |
eng/scripts/get-aspire-cli.ps1 | Complete rewrite with enhanced error handling, new quality mappings, and SupportsShouldProcess |
eng/scripts/README.md | Updates quality documentation from 'daily' to new quality values (dev, staging, ga) |
docs/using-latest-daily.md | Changes installation instructions from dotnet tool to script-based installation |
This brings the scripts at par with |
Backport the following overlapping PRs:
using-latest-daily.md: Update instructions to get cli (#10506)
Update scripts to use the new Quality mappings to urls (#10479)
using-latest-daily.md: fix instructions for getting daily cli (#10544)
get-aspire-cli: Some fixes and cleanup (#10578)