Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ explicitly and may still change before the official spec release.
- Pointed prerelease package documentation links at `dev/2026-07-28-rc` so
pub.dev users see the draft/RC docs that match the dev package.

## 2.2.1

### Spec Alignment

- Accepted and preserved JSON Schema 2020-12 boolean subschemas in nested
schema positions such as object properties, array items, composition
keywords, and `not`.

## 2.2.0

### Documentation
Expand Down
31 changes: 25 additions & 6 deletions tool/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,33 @@ switch ($Arch) {
}

if ($Version -eq "latest") {
$Releases = Invoke-RestMethod "https://api.github.com/repos/$Repo/releases?per_page=50"
$Release = $Releases | Where-Object {
$_.tag_name -like "mcp_dart_cli-v*" -and -not $_.prerelease
} | Select-Object -First 1
if (-not $Release) {
$Tag = $null
try {
$Releases = Invoke-RestMethod "https://api.github.com/repos/$Repo/releases?per_page=50"
$Release = $Releases | Where-Object {
$_.tag_name -like "mcp_dart_cli-v*" -and -not $_.prerelease
} | Select-Object -First 1
if ($Release) {
$Tag = $Release.tag_name
}
} catch {
# Fall through to the public releases page, which avoids API rate limits.
}

if (-not $Tag) {
$ReleasesPage = Invoke-WebRequest "https://github.com/$Repo/releases"
$Match = [regex]::Match(
$ReleasesPage.Content,
"mcp_dart_cli-v[0-9]+\.[0-9]+\.[0-9]+([-+][0-9A-Za-z.-]+)?"
)
if ($Match.Success) {
$Tag = $Match.Value
}
}

if (-not $Tag) {
throw "Could not find a mcp_dart_cli GitHub release."
}
$Tag = $Release.tag_name
} elseif ($Version.StartsWith("mcp_dart_cli-v")) {
$Tag = $Version
} else {
Expand Down
26 changes: 24 additions & 2 deletions tool/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ detect_arch() {
esac
}

latest_cli_tag() {
curl -fsSL "https://api.github.com/repos/$repo/releases?per_page=50" |
latest_cli_tag_from_api() {
response="$(curl -fsSL "https://api.github.com/repos/$repo/releases?per_page=50" 2>/dev/null)" || return 1
printf '%s\n' "$response" |
awk '
function reset_release() {
tag = ""
Expand Down Expand Up @@ -76,6 +77,27 @@ latest_cli_tag() {
'
}

latest_cli_tag_from_releases_page() {
response="$(curl -fsSL "https://github.com/$repo/releases")" || return 1
printf '%s\n' "$response" |
awk '
match($0, /mcp_dart_cli-v[0-9]+[.][0-9]+[.][0-9]+([-+][0-9A-Za-z.-]+)?/) {
print substr($0, RSTART, RLENGTH)
exit
}
'
}

latest_cli_tag() {
tag="$(latest_cli_tag_from_api || true)"
if [ -n "$tag" ]; then
echo "$tag"
return 0
fi

latest_cli_tag_from_releases_page
}

require curl
require uname
require awk
Expand Down