-
Notifications
You must be signed in to change notification settings - Fork 746
Support separate container and product versions for stable CLI installs on our CLI scripts #13048
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
base: main
Are you sure you want to change the base?
Conversation
… clarify versioning in help messages
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13048Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13048" |
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 adds support for installing stable versions of the Aspire CLI when the container path version differs from the product version. This addresses a scenario where stable builds (e.g., 9.5.0) are stored in blob storage under unstable container paths (e.g., 9.5.0-preview.1.25522.3) to avoid naming conflicts during build respins.
Key changes:
- Adds new
--product-version/-ProductVersionparameter to both CLI installation scripts - Updates URL construction logic to use container version in path and product version in filename
- Maintains backward compatibility by defaulting product version to container version when not specified
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| eng/scripts/get-aspire-cli.sh | Adds --product-version parameter, updates construct_aspire_cli_url() function to accept and use product version in filename generation, updates help text and examples |
| eng/scripts/get-aspire-cli.ps1 | Adds -ProductVersion parameter, updates Get-AspireCliUrl() function to accept and use product version in filename generation, updates help text and examples |
|
@joperezr Can you help me understand how this would get used? Would it only be when we re-spin a stable version? How would users get to the know the "latest unstable version" to use? |
Today we always produce blobs like this, meaning the container name is always unstable in order avoid issues in the case we need to re-spin a stable version to avoid clashes. To your point, it is not straight forward to know which prerelease version to use when you want to install an older stable version, and for the most part that's okay because most people will want to always install the latest from each channel anyway which uses aka.ms links to abstract these versions from them, but there will be cases where people want/need to get an older CLI, and these changes just allow them to be able to get them. For instance, let's say for some reason someone needs to get the 9.5.2 CLI for some reason, since we've shipped 13.0 now, the GA channel will just get them 13.0 instead, so they need to pass in version to get 9.5.2, but if they try to do This is because the url it is trying to fetch is |
Description
This PR updates the
get-aspire-cli.ps1andget-aspire-cli.shscripts to support installing stable versions of the Aspire CLI when the container path version differs from the product version.Background
When stabilizing builds, the product version becomes stable (e.g.,
9.5.0), but the container name/path in blob storage remains unstable (e.g.,9.5.0-preview.1.25522.3). This is done intentionally to avoid clashes if the stable build needs to be re-spun, as each build gets a unique container path based on its build number.Changes
Both scripts now accept separate version parameters:
-Version/--version: The container path version (unstable) used in the blob storage URL path-ProductVersion/--product-version: The actual CLI executable product version (stable) used in the filenameWhen
ProductVersion/--product-versionis not specified, it defaults to the value ofVersion/--version, maintaining backward compatibility for unstable/preview builds where both versions are identical.Examples
Unstable/preview builds (no change in behavior):
./get-aspire-cli.sh --version "9.5.0-preview.1.25366.3"Stable builds (new capability):
This results in URLs like:
Where the path uses the unstable container version, but the filename contains the stable product version.
Checklist
doc-ideatemplatebreaking-changetemplatediagnostictemplate