Add stable/latest version aliases to install-gh-aw.sh and upgrade command#23469
Add stable/latest version aliases to install-gh-aw.sh and upgrade command#23469
Conversation
- Add resolve_stable_version() function that fetches all releases via the GitHub API and returns the highest release in the previous minor version band (e.g. v0.1.10 when the latest is v0.2.2) - Change default version alias from 'latest' to 'stable' - Stable resolution falls back to 'latest' when no previous minor band exists or contains no releases - Supports jq for parsing and falls back to grep/sed for portability - Update test script: rename Test 11, add Test 12 with inline algorithm tests covering standard, fallback, and highest-patch-selection cases" Agent-Logs-Url: https://github.com/github/gh-aw/sessions/770feefe-a50d-48b9-b307-3968176421e6 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ing, and test duplication rationale Agent-Logs-Url: https://github.com/github/gh-aw/sessions/770feefe-a50d-48b9-b307-3968176421e6 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot Update the "upgrade" to support this scheme. Upgrade should take optionally the release channel. Default is stable |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bbaf44e4-a31d-4b73-a6e6-9dae9c5ce205 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot also look at upgrade command |
- Add getStableRelease() to update_check.go that resolves the highest release
in the previous minor version band (e.g. v0.1.10 when latest is v0.2.2)
- Add Prerelease and Draft fields to Release struct for proper filtering
- Update upgradeExtensionIfOutdated to accept a channel parameter ('stable'
or 'latest'), default 'stable'
- Add buildExtensionInstallCommand helper that uses 'gh extension upgrade'
for latest and 'gh extension install --force --pin VERSION' for stable
- Add --channel flag (default 'stable') to upgrade command with validation
- Thread channel through runUpgradeCommand call chain
- Update help text with RELEASE CHANNEL section and --channel examples
- Update tests to pass channel parameter; add test for latest channel
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/bbaf44e4-a31d-4b73-a6e6-9dae9c5ce205
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in commit
Changes:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Already done in commit |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Hey This PR looks well-structured and ready for maintainer review. Here's a quick summary of the checklist:
Verdict: 🟢 Aligned — the PR aligns with the project's guidelines and quality standards. Nice to see inline algorithm tests (Test 12b) covering the edge cases (no previous minor band, empty band, highest-patch selection). Once the draft is marked ready, this should be in good shape for review.
|
Adds
stableandlatestrelease channel support to both the install script and theupgradecommand.Version Aliases
stable(new default) – resolves to the highest release in the previous minor version band relative to the latest release.Example: if the latest is
v0.2.2and releases includev0.1.10,stableresolves tov0.1.10.latest– the most recent release.Changes
install-gh-aw.sh/actions/setup-cli/install.shresolve_stable_version()function that:/releases?per_page=100).jqwhen available, with a portablegrep/sedfallback that also filters out pre-release tags (v1.0.0-rc.1, etc.) via a strict semver regex.latestwhen the latest is already av{major}.0.xrelease or when no releases exist in the previous minor band.VERSIONfrom"latest"to"stable".gh extension installattempt and the download URL construction, convertingstableto a concrete version tag.scripts/test-install-script.shstable) andlatestURL alias checks.resolve_stable_version.v0.2.2latest →v0.1.10stablev1.0.xonly) → falls back to latestv2.0.5fromv2.0.1,v2.0.3,v2.0.5)pkg/cli/upgrade_command.go--channelflag (acceptsstableorlatest, defaultstable) to theupgradecommand.Channel stringtoUpgradeConfig.--channelusage examples.pkg/cli/update_extension_check.goupgradeExtensionIfOutdatedto accept achannelparameter.stablechannel: resolves viagetStableRelease()and installs withgh extension install --force --pin VERSION.latestchannel: resolves viagetLatestRelease()and installs withgh extension upgrade(existing behaviour).buildExtensionInstallCommand()helper to select the correctghsubcommand per channel.pkg/cli/update_check.goPrereleaseandDraftfields to theReleasestruct for accurate filtering.getStableRelease()function implementing the same algorithm as the shell script.📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.