Skip to content

Commit 7d2a635

Browse files
radicalCopilot
andcommitted
Update scripts to use the new Quality mappings to urls (dotnet#10479)
## 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)
1 parent a4351bd commit 7d2a635

File tree

4 files changed

+632
-218
lines changed

4 files changed

+632
-218
lines changed

docs/using-latest-daily.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,24 @@ On Windows:
4343
iex "& { $(irm https://github.com/dotnet/aspire/raw/refs/heads/main/eng/scripts/get-aspire-cli.ps1) }"
4444
```
4545

46+
or with arguments like:
47+
48+
```powershell
49+
iex "& { $(irm https://github.com/dotnet/aspire/raw/refs/heads/main/eng/scripts/get-aspire-cli.ps1) } -Quality staging"
50+
```
51+
4652
On Linux, or macOS:
4753

4854
```sh
4955
curl -sSL https://github.com/dotnet/aspire/raw/refs/heads/main/eng/scripts/get-aspire-cli.sh | bash
5056
```
5157

58+
or with arguments like:
59+
60+
```sh
61+
curl -sSL https://github.com/dotnet/aspire/raw/refs/heads/main/eng/scripts/get-aspire-cli.sh | bash -s -- -q staging
62+
```
63+
5264
<!-- break between blocks -->
5365

5466
## Create a new Project

eng/scripts/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ This directory contains scripts to download and install the Aspire CLI for diffe
99

1010
## Current Limitations
1111

12-
⚠️ **Important**: Currently, only the following combination works:
13-
- **Version**: `9.0`
14-
- **Quality**: `daily`
12+
Supported Quality values:
1513

16-
Other version/quality combinations are not yet available through the download URLs.
14+
- `dev` - builds from the `main` branch
15+
- `staging` - builds from the current `release` branch like `release/9.4`
16+
- `ga` - build for the latest GA
1717

1818
## Parameters
1919

@@ -23,7 +23,7 @@ Other version/quality combinations are not yet available through the download UR
2323
|------------------|-------|---------------------------------------------------|-----------------------|
2424
| `--install-path` | `-i` | Directory to install the CLI | `$HOME/.aspire/bin` |
2525
| `--version` | | Version of the Aspire CLI to download | `9.0` |
26-
| `--quality` | `-q` | Quality to download | `daily` |
26+
| `--quality` | `-q` | Quality to download | `release` |
2727
| `--os` | | Operating system (auto-detected if not specified) | auto-detect |
2828
| `--arch` | | Architecture (auto-detected if not specified) | auto-detect |
2929
| `--keep-archive` | `-k` | Keep downloaded archive files after installation | `false` |
@@ -32,15 +32,15 @@ Other version/quality combinations are not yet available through the download UR
3232

3333
### PowerShell Script (`get-aspire-cli.ps1`)
3434

35-
| Parameter | Description | Default |
36-
|-----------------|---------------------------------------------------|----------------------------------|
37-
| `-InstallPath` | Directory to install the CLI | `$HOME/.aspire/bin` (Unix) / `%USERPROFILE%\.aspire\bin` (Windows) |
38-
| `-Version` | Version of the Aspire CLI to download | `9.0` |
39-
| `-Quality` | Quality to download | `daily` |
40-
| `-OS` | Operating system (auto-detected if not specified) | auto-detect |
41-
| `-Architecture` | Architecture (auto-detected if not specified) | auto-detect |
42-
| `-KeepArchive` | Keep downloaded archive files after installation | `false` |
43-
| `-Help` | Show help message | |
35+
| Parameter | Description | Default |
36+
|-----------------|---------------------------------------------------|--------------------------------------------------------------------|
37+
| `-InstallPath` | Directory to install the CLI | `$HOME/.aspire/bin` (Unix) / `%USERPROFILE%\.aspire\bin` (Windows) |
38+
| `-Version` | Version of the Aspire CLI to download | `9.0` |
39+
| `-Quality` | Quality to download | `release` |
40+
| `-OS` | Operating system (auto-detected if not specified) | auto-detect |
41+
| `-Architecture` | Architecture (auto-detected if not specified) | auto-detect |
42+
| `-KeepArchive` | Keep downloaded archive files after installation | `false` |
43+
| `-Help` | Show help message | |
4444

4545
## Install Path Parameter
4646

0 commit comments

Comments
 (0)