Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
f467549
PR1-S2: csproj AspireCliChannel property + AssemblyMetadata + smoke test
radical May 6, 2026
215150e
PR1-S1+S2: AzDO computeCliChannel step + propagate to MSBuild
radical May 6, 2026
f637601
PR1-S5: AssemblyMetadataChannelTests smoke test (channel ∈ {stable,st…
radical May 6, 2026
1aeeb64
PR1-S3: CliExecutionContext.Channel + PrNumber properties + tests
radical May 6, 2026
83bacad
PR1-S2b: compute aspireCliChannel inline in build_sign_native.yml (B6…
radical May 6, 2026
183d9a9
PR1-S6: remove global-channel writes from install scripts
radical May 6, 2026
6f1396c
PR1-S7: remove global-channel read fallback from 3 project readers
radical May 6, 2026
8c2d295
PR1-S8: drop channel from legacy globalsettings.json migration
radical May 6, 2026
e948c5c
PR1-S4: rewrite IdentityChannelReader to read AspireCliChannel from A…
radical May 6, 2026
81c06f2
PR1-S9: remove --self channel write from UpdateCommand
radical May 6, 2026
20fa110
PR1-S10: switch project-channel reseed source to CliExecutionContext.…
radical May 6, 2026
93210ff
PR1-S11: deep test coverage — IdentityChannelReader, GlobalChannelFal…
radical May 6, 2026
a1ccd97
PR1-TG1: IdentityChannelReader edge cases — invalid value, multiple a…
radical May 6, 2026
16fed5b
PR1-TG2: InformationalVersion parsing edges — empty, no-pr, no-digits…
radical May 6, 2026
9797416
PR1-S12: wire IIdentityChannelReader into DI + bootstrap read for Cli…
radical May 6, 2026
e7a94bf
PR1-S12-test: replace snapshot test with positive coverage for IIdent…
radical May 6, 2026
8ba3dcb
PR1-S7-test-fix: update reflection target after sync rename of Resolv…
radical May 6, 2026
03b4244
PR1-S12-fix: pin IdentityChannelReader to typeof(Program).Assembly to…
radical May 6, 2026
918da04
PR1-S6-followup: scrub workstream-local tombstone comments
radical May 6, 2026
8f24c8e
PR1-S4-followup: cache IdentityChannelReader.ReadChannel result
radical May 6, 2026
a808337
PR1-TG2-followup: convert ParsePrNumber Fact tests to Theory with Inl…
radical May 6, 2026
127e182
PR1-followup: drop workstream-internal labels from test comments
radical May 6, 2026
e95e188
PR1-fix: delete dead computeCliChannel step (B6 follow-through cleanup)
radical May 6, 2026
0e95137
PR1-fix: explicit AspireCliChannel propagation through clipack <MSBui…
radical May 6, 2026
3c76521
PR1-fix: CliExecutionContext.Channel resolves to pr-<N> for PR builds…
radical May 6, 2026
659f832
PR1-fix: ParsePrNumber accepts the real CI -pr.<N> shape from ci.yml
radical May 6, 2026
aec9681
PR1-fix: gate PrNumber parse on channel == "pr"
radical May 6, 2026
a061002
PR1-S7-followup: remove global-channel fallback from TemplateNuGetCon…
radical May 6, 2026
9499836
PR1-fix: remove IdentityChannelReader ctor default to close GetEntryA…
radical May 6, 2026
9c00432
PR1-test-fix: ParsePrNumber Theory accepts -pr.<N>.g<SHA> CI shape
radical May 6, 2026
7dce841
PR1-test: CliExecutionContext.Channel returns pr-<N> for PR builds (o…
radical May 6, 2026
e031e1c
PR1-test: TemplateNuGetConfigServiceTests verify 4th-reader fallback …
radical May 6, 2026
b5d4de2
PR1-test: ChannelReseedTests exercise real production scaffold paths
radical May 6, 2026
72d2e7d
PR1-test-fix: CliBootstrapTests decoupled from hardcoded daily + Iden…
radical May 6, 2026
ed36ba2
cleanup: rewrite comments to stand on their own without design-doc re…
radical May 6, 2026
5b9dd62
test: update ConfigMigrationTests for new migration drops channel field
radical May 6, 2026
956a5a5
test: add release-script regression — global aspire.config.json#chann…
radical May 6, 2026
9b3c6aa
test: assert AspireCliChannel forwarded through clipack <MSBuild> Add…
radical May 6, 2026
ae5986d
fix: InitCommand defaults channel to CliExecutionContext.Channel
radical May 6, 2026
9e44fc2
test: InitCommand defaults channel to CliExecutionContext.Channel
radical May 6, 2026
1a99aa4
fix: extend channel default to InitCommand single-file path
radical May 6, 2026
fd4c3c2
test cleanup: rewrite InitCommandTests comment per C-001
radical May 6, 2026
a4f902f
test: extend "channel dropped on migration" assertions to two more tests
radical May 6, 2026
9fe9daf
fix: resolve polyglot E2E test failures for local-channel CLI builds
radical May 6, 2026
714eaee
fix(packaging): guard pr-<N> hives from local-channel alias rename
radical May 6, 2026
31f7f85
fix(scripts): default hive_label to "local" for local-dir installs
radical May 6, 2026
ed36ba4
fix(cli): guard PSM emission for local identity channel; remove Wave …
radical May 6, 2026
23510a5
test: cover PSM guard for local-identity hive in PrebuiltAppHostServer
radical May 6, 2026
7dc95fb
fix(cli): align channel taxonomy to 5 values; default to "local"
radical May 7, 2026
8514a69
fix(cli): tighten PSM-skip guard to local identity only
radical May 7, 2026
3703c5c
ci+scripts: compute AspireCliChannel per build kind; align local-dir …
radical May 7, 2026
4e9ea68
fix(scripts): derive hive label from local-dir package filenames
radical May 7, 2026
18dc5de
Merge remote-tracking branch 'origin/main' into ankj/v3-pr1-channel
radical May 7, 2026
123f54b
ci(azdo): collapse redundant elif/else in computeCliChannel step
radical May 7, 2026
73c4047
fix(cli): prefer local-build channel in 'aspire new' template version…
radical May 7, 2026
de40e93
tests: direct guards for C2 (csproj default = local) and H1 (no GITHU…
radical May 7, 2026
1d7e890
style(packaging): remove stray blank line in PackagingService
radical May 8, 2026
4f2d32f
style(channel): flip seedChannel arms for readability
radical May 8, 2026
401b4ed
refactor(channel): use PackageChannelNames.Local in IsLocalBuildChannel
radical May 8, 2026
448a219
test(packaging): pin local-hive channel Aspire* mapping is the on-dis…
radical May 8, 2026
e7d1a03
test(add): pin 'aspire add' picks local-hive package on local-channel…
radical May 8, 2026
6c2f1de
chore(scripts): remove dead Save-GlobalSettings helper in PR route
radical May 8, 2026
08ffaa1
chore(scripts): remove dead Save/Remove-GlobalSettings helpers in rel…
radical May 8, 2026
bb25d74
refactor(cli): rename GetPrHiveCount to GetHiveCount (counts all hive…
radical May 8, 2026
89b2358
docs(cli): include local in CliExecutionContext.Channel XML doc
radical May 8, 2026
9662e45
chore: ignore .squad/ team scratch and remove leaked artifacts
radical May 8, 2026
ac3525d
test(cli): cover malformed InformationalVersion edge cases in ParsePr…
radical May 8, 2026
765965b
fix(cli): default 'local' channel to implicit when no local hive exists
radical May 8, 2026
a7427c8
refactor(cli): drop vestigial IConfigurationService injection from ch…
radical May 8, 2026
16b6bbd
fix(cli)!: throw when CliExecutionContext is constructed with channel…
radical May 8, 2026
8a17c51
chore(cli): clean up stale global-channel comments and docs
radical May 8, 2026
7747088
style: remove internal coordination references from comments
radical May 8, 2026
7a5c61d
test(cli): pass prNumber when constructing pr-channel CliExecutionCon…
radical May 8, 2026
ab05ee0
Merge branch 'origin/main' into ankj/v3-pr1-channel
radical May 8, 2026
b2fb48d
chore: ignore tags file (universal ctags output)
radical May 8, 2026
06b4db7
test(packaging): cover empty local hive directory (G1)
radical May 8, 2026
ecf999a
test(packaging): pin cross-hive precedence for aspire add (F)
radical May 8, 2026
c2ce7d6
Merge remote-tracking branch 'origin/main' into ankj/v3-pr1-channel
radical May 8, 2026
b7d7417
cleanup: drop journey markers, structural shape-pinning, and stale do…
radical May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/build-cli-native-archives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ jobs:
strategy:
matrix:
targets: ${{ fromJson(inputs.targets) }}
# Compute the Aspire CLI channel from the triggering GH Actions event,
# mirroring the algorithm in eng/pipelines/templates/build_sign_native.yml
# (computeCliChannel step):
# pull_request -> pr
# refs/heads/release/* -> staging
# refs/heads/internal/release/* -> staging
# anything else (push to main, schedule, workflow_dispatch) -> daily
# The AzDO 'stable' branch (DotNetFinalVersionKind == 'release') is
# intentionally omitted: stable archives are produced only by the AzDO
# release pipeline, never by GH Actions.
env:
ASPIRE_CLI_CHANNEL: ${{ github.event_name == 'pull_request' && 'pr' || (startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/internal/release/')) && 'staging' || 'daily' }}

steps:
- name: Checkout code
Expand All @@ -56,6 +68,7 @@ jobs:
/bl:${{ github.workspace }}/artifacts/log/${{ inputs.configuration }}/BuildBundleDeps.binlog
/p:ContinuousIntegrationBuild=true
/p:BuildBundleDepsOnly=true
/p:AspireCliChannel=${{ env.ASPIRE_CLI_CHANNEL }}
${{ inputs.versionOverrideArg }}
- name: Build bundle payload archive
Expand Down Expand Up @@ -85,6 +98,7 @@ jobs:
/p:SkipManagedBuild=true
/p:TargetRids=${{ matrix.targets.rids }}
/p:BundlePayloadPath=${{ github.workspace }}/artifacts/bundle/aspire-ci-bundlepayload-${{ matrix.targets.rids }}.tar.gz
/p:AspireCliChannel=${{ env.ASPIRE_CLI_CHANNEL }}
${{ inputs.versionOverrideArg }}
- name: Verify CLI tool nupkg
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/polyglot-validation/setup-local-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,27 @@ echo "=== Extracting bundle ==="

# Set up NuGet hive
echo "=== Setting up NuGet package hive ==="
HIVE_DIR="$ASPIRE_HOME/hives/local/packages"
mkdir -p "$HIVE_DIR"

SHIPPING_DIR="$NUGETS_DIR/Release/Shipping"
if [ ! -d "$SHIPPING_DIR" ]; then
SHIPPING_DIR="$NUGETS_DIR"
fi

# Auto-detect PR identity from .nupkg filenames (e.g. "Aspire.Cli.13.4.0-pr.16820.g3703c5c4.nupkg")
# so PR-built packages land in the same hive the CLI's CliExecutionContext.Channel resolves to
# ("pr-<N>"). Falls back to "local" for true local-dev builds.
HIVE_LABEL="local"
SAMPLE_NUPKG=$(find "$SHIPPING_DIR" "$NUGETS_RID_DIR" -maxdepth 4 -name "Aspire.Cli.*.nupkg" 2>/dev/null | head -1)
if [ -n "$SAMPLE_NUPKG" ]; then
SUFFIX=$(basename "$SAMPLE_NUPKG" | sed -nE 's/.*-(pr\.[0-9]+\.[0-9a-g]+).*\.nupkg$/\1/p')
if [[ "$SUFFIX" =~ ^pr\.([0-9]+)\.[0-9a-g]+$ ]]; then
HIVE_LABEL="pr-${BASH_REMATCH[1]}"
fi
fi
HIVE_DIR="$ASPIRE_HOME/hives/$HIVE_LABEL/packages"
echo " Using hive label: $HIVE_LABEL"
mkdir -p "$HIVE_DIR"

if [ -d "$SHIPPING_DIR" ]; then
find "$SHIPPING_DIR" -name "*.nupkg" -exec cp {} "$HIVE_DIR/" \;
echo " ✓ Copied $(find "$HIVE_DIR" -name "*.nupkg" | wc -l) packages"
Expand All @@ -56,11 +69,5 @@ fi

echo " Total packages in hive: $(find "$HIVE_DIR" -name "*.nupkg" | wc -l)"

# Set the channel to 'local' so CLI uses our hive
echo "=== Configuring CLI channel ==="
"$ASPIRE_HOME/bin/aspire" config set channel local --global || {
echo " Warning: Failed to set channel"
}

echo ""
echo "=== Aspire CLI setup complete ==="
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,5 @@ extension/package.nls.*.json
# Azure Functions local settings (may contain encrypted secrets)
local.settings.json
diagnostics.log
.squad/
tags
5 changes: 5 additions & 0 deletions eng/clipack/Common.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
<!-- Pass through version properties so the CLI gets the correct version -->
<AdditionalProperties Condition="'$(VersionSuffix)' != ''" Include="VersionSuffix=$(VersionSuffix)" />
<AdditionalProperties Condition="'$(OfficialBuildId)' != ''" Include="OfficialBuildId=$(OfficialBuildId)" />
<!-- Forward AspireCliChannel explicitly rather than relying on global-property
inheritance through the inner <MSBuild> invocation below. Matches the
explicit-forwarding pattern used for RuntimeIdentifier, VersionSuffix,
and Configuration. -->
<AdditionalProperties Condition="'$(AspireCliChannel)' != ''" Include="AspireCliChannel=$(AspireCliChannel)" />
</ItemGroup>

<ItemGroup Condition="'$(PublishNativeAot)' == 'true'">
Expand Down
35 changes: 35 additions & 0 deletions eng/pipelines/templates/build_sign_native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,40 @@ jobs:
displayName: 🟣Restore

steps:
# Compute the Aspire CLI channel for the AspireCliChannel MSBuild
# property consumed by the native CLI build below. This is the canonical
# AzDO compute: build_sign_native runs BEFORE the `build` stage (per the
# dependsOn graph), so an output variable from a later stage would not
# be visible here, and there is no other AzDO consumer of this value.
# The variable is job-scoped (no isOutput=true) since it is consumed by
# a later step in the same job.
- pwsh: |
$ErrorActionPreference = 'Stop'
$reason = '$(Build.Reason)'
$sourceBranch = '$(Build.SourceBranch)'
Write-Host "Build.Reason: '$reason'"
Write-Host "Build.SourceBranch: '$sourceBranch'"

$versionKind = & "$(Build.SourcesDirectory)/$(dotnetScript)" msbuild "$(Build.SourcesDirectory)/eng/Versions.props" -getProperty:DotNetFinalVersionKind
$versionKind = $versionKind.Trim()
Write-Host "DotNetFinalVersionKind: '$versionKind'"

if ($reason -eq 'PullRequest') {
$channel = 'pr'
} elseif ($versionKind -eq 'release') {
$channel = 'stable'
} elseif ($sourceBranch -match '^refs/heads/(release|internal/release)/') {
$channel = 'staging'
} else {
# main and any other branch fall through to daily
$channel = 'daily'
}

Write-Host "Aspire CLI channel: $channel"
Write-Host "##vso[task.setvariable variable=aspireCliChannel]$channel"
name: computeCliChannel
displayName: 🟣Determine Aspire CLI channel

# Build, publish, and sign aspire-managed before creating the bundle layout.
# This ensures aspire-managed is signed before CreateLayout packs it into the bundle archive.
# Step 1: dotnet publish produces the self-contained single-file binary.
Expand Down Expand Up @@ -143,6 +177,7 @@ jobs:
/p:SkipManagedBuild=true
/p:TargetRids=${{ targetRid }}
/p:BundlePayloadPath=$(Build.SourcesDirectory)/artifacts/bundle/aspire-ci-bundlepayload-${{ targetRid }}.tar.gz
/p:AspireCliChannel=$(aspireCliChannel)
$(_buildArgs)
${{ parameters.extraBuildArgs }}
/bl:$(Build.Arcade.LogsPath)Build.binlog
Expand Down
68 changes: 16 additions & 52 deletions eng/scripts/get-aspire-cli-pr.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Mutually exclusive with PRNumber and WorkflowRunId.

.PARAMETER HiveLabel
Override the NuGet hive label (default: pr-PRNUMBER, run-RUNID, or run-GITHUB_RUN_ID for LocalDir).
Override the NuGet hive label (default: pr-PRNUMBER, run-RUNID, or local for LocalDir).

.PARAMETER InstallPath
Directory prefix to install (default: $HOME/.aspire on Unix, %USERPROFILE%\.aspire on Windows)
Expand Down Expand Up @@ -109,7 +109,7 @@ param(
[Parameter(HelpMessage = "Use pre-downloaded artifacts from a local directory instead of downloading from GitHub")]
[string]$LocalDir = "",

[Parameter(HelpMessage = "Override the NuGet hive label (default: pr-<PR>, run-<RUN_ID>, or run-<GITHUB_RUN_ID> (run-local when GITHUB_RUN_ID is unset))")]
[Parameter(HelpMessage = "Override the NuGet hive label (default: pr-<PR>, run-<RUN_ID>, or local for --LocalDir)")]
[string]$HiveLabel = "",

[Parameter(HelpMessage = "Directory prefix to install")]
Expand Down Expand Up @@ -742,37 +742,6 @@ function Remove-TempDirectory {
# END: Shared code
# =============================================================================

# Function to save global settings using the aspire CLI
# Uses 'aspire config set -g' to set global configuration values
# Expected schema of ~/.aspire/globalsettings.json:
# {
# "channel": "string" // The channel name (e.g., "daily", "staging", "pr-1234")
# }
function Save-GlobalSettings {
[CmdletBinding(SupportsShouldProcess)]
param(
[Parameter(Mandatory = $true)]
[string]$CliPath,

[Parameter(Mandatory = $true)]
[string]$Key,

[Parameter(Mandatory = $true)]
[string]$Value
)

if ($PSCmdlet.ShouldProcess("$Key = $Value", "Set global config via aspire CLI")) {
Write-Message "Setting global config: $Key = $Value" -Level Verbose

$output = & $CliPath config set -g $Key $Value 2>&1
if ($LASTEXITCODE -ne 0) {
Write-Message "Failed to set global config via aspire CLI" -Level Warning
return
}
Write-Message "Global config saved: $Key = $Value" -Level Verbose
}
}

# Function to check if gh command is available
function Test-GitHubCLIDependency {
[CmdletBinding()]
Expand Down Expand Up @@ -1268,10 +1237,21 @@ function Start-InstallFromLocalDir {
$cliBinDir = Join-Path $resolvedInstallPrefix "bin"
$resolvedHiveLabel = if ($HiveLabel) {
$HiveLabel
} elseif ($env:GITHUB_RUN_ID) {
"run-$($env:GITHUB_RUN_ID)"
} else {
"run-local"
# Auto-detect PR identity from .nupkg filenames (e.g. "13.4.0-pr.16820.g3703c5c4")
# so PR-built packages land in the same hive the CLI's CliExecutionContext.Channel
# resolves to ("pr-<N>"). Falls back to "local" for true local-dev builds.
$detectedLabel = "local"
try {
$detectedSuffix = Get-VersionSuffixFromPackages -DownloadDir $LocalDirPath
if ($detectedSuffix -match '^pr\.(\d+)\.[0-9a-g]+$') {
$detectedLabel = "pr-$($Matches[1])"
}
}
catch {
# No PR-style packages in the local dir; keep "local".
}
$detectedLabel
}
$nugetHiveDir = Join-Path $resolvedInstallPrefix "hives" $resolvedHiveLabel "packages"

Expand All @@ -1298,13 +1278,6 @@ function Start-InstallFromLocalDir {
Write-Message "Could not extract version suffix from local packages: $($_.Exception.Message)" -Level Warning
}

# Save the global channel setting
if (-not $HiveOnly) {
$cliExe = if ($Script:HostOS -eq "win") { "aspire.exe" } else { "aspire" }
$cliPath = Join-Path $cliBinDir $cliExe
Save-GlobalSettings -CliPath $cliPath -Key "channel" -Value $resolvedHiveLabel
}

# Update PATH environment variables
if (-not $HiveOnly) {
if ($SkipPath) {
Expand Down Expand Up @@ -1399,15 +1372,6 @@ function Start-DownloadAndInstall {
}
}

# Save the global channel setting to the PR hive channel
# This allows 'aspire new' and 'aspire init' to use the same channel by default
if (-not $HiveOnly) {
# Determine CLI path
$cliExe = if ($Script:HostOS -eq "win") { "aspire.exe" } else { "aspire" }
$cliPath = Join-Path $cliBinDir $cliExe
Save-GlobalSettings -CliPath $cliPath -Key "channel" -Value $resolvedHiveLabel
}

# Update PATH environment variables
if (-not $HiveOnly) {
if ($SkipPath) {
Expand Down
70 changes: 11 additions & 59 deletions eng/scripts/get-aspire-cli-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ USAGE:
The directory must contain CLI archive files (aspire-cli-*.tar.gz or .zip)
and optionally NuGet packages (*.nupkg).
--hive-label LABEL Override the NuGet hive label (default: pr-<PR_NUMBER>, run-<RUN_ID>,
or run-<GITHUB_RUN_ID> (or run-local if GITHUB_RUN_ID is unset) for --local-dir)
or local for --local-dir)
-i, --install-path PATH Directory prefix to install (default: ~/.aspire)
CLI installs to: <install-path>/bin
NuGet hive: <install-path>/hives/pr-<PR_NUMBER>/packages (or run-<RUN_ID>)
Expand Down Expand Up @@ -444,36 +444,6 @@ install_archive() {
say_verbose "Successfully installed archive"
}

# Function to save global settings using the aspire CLI
# Uses 'aspire config set -g' to set global configuration values
# Parameters:
# $1 - cli_path: Path to the aspire CLI executable
# $2 - key: The configuration key to set
# $3 - value: The value to set
# Expected schema of ~/.aspire/globalsettings.json:
# {
# "channel": "string" // The channel name (e.g., "daily", "staging", "pr-1234")
# }
save_global_settings() {
local cli_path="$1"
local key="$2"
local value="$3"

if [[ "$DRY_RUN" == true ]]; then
say_info "[DRY RUN] Would run: $cli_path config set -g $key $value"
return 0
fi

say_verbose "Setting global config: $key = $value"

if ! "$cli_path" config set -g "$key" "$value" 2>/dev/null; then
say_warn "Failed to set global config via aspire CLI"
return 1
fi

say_verbose "Global config saved: $key = $value"
}

# Function to add PATH to shell configuration file
# Parameters:
# $1 - config_file: Path to the shell configuration file
Expand Down Expand Up @@ -1017,10 +987,17 @@ install_from_local_dir() {
local hive_label
if [[ -n "$HIVE_LABEL" ]]; then
hive_label="$HIVE_LABEL"
elif [[ -n "${GITHUB_RUN_ID:-}" ]]; then
hive_label="run-$GITHUB_RUN_ID"
else
hive_label="run-local"
# Auto-detect PR identity from .nupkg filenames (e.g. "13.4.0-pr.16820.g3703c5c4")
# so PR-built packages land in the same hive the CLI's CliExecutionContext.Channel
# resolves to ("pr-<N>"). Falls back to "local" for true local-dev builds.
local detected_suffix
if detected_suffix=$(extract_version_suffix_from_packages "$local_dir") \
&& [[ "$detected_suffix" =~ ^pr\.([0-9]+)\.[0-9a-g]+$ ]]; then
hive_label="pr-${BASH_REMATCH[1]}"
else
hive_label="local"
fi
fi
local nuget_hive_dir="$INSTALL_PREFIX/hives/$hive_label/packages"

Expand Down Expand Up @@ -1075,17 +1052,6 @@ install_from_local_dir() {
else
say_warn "Could not extract version suffix from local packages"
fi

# Save the global channel setting
if [[ "$HIVE_ONLY" != true ]]; then
local cli_path
if [[ -f "$cli_install_dir/aspire.exe" ]]; then
cli_path="$cli_install_dir/aspire.exe"
else
cli_path="$cli_install_dir/aspire"
fi
save_global_settings "$cli_path" "channel" "$hive_label" || true
fi
}

# Main function to download and install from PR or workflow run ID
Expand Down Expand Up @@ -1198,20 +1164,6 @@ download_and_install_from_pr() {
install_aspire_extension "$extension_download_dir"
fi
fi

# Save the global channel setting to the PR hive channel
# This allows 'aspire new' and 'aspire init' to use the same channel by default
if [[ "$HIVE_ONLY" != true ]]; then
# Determine CLI path
local cli_path
if [[ -f "$cli_install_dir/aspire.exe" ]]; then
cli_path="$cli_install_dir/aspire.exe"
else
cli_path="$cli_install_dir/aspire"
fi
# Non-fatal: channel can be set manually if this fails
save_global_settings "$cli_path" "channel" "$hive_label" || true
fi
}

# Main entry point — wraps everything after function definitions.
Expand Down
Loading
Loading