geogebra5: Update to version 5.4.913.0, fix checkver#2696
Conversation
WalkthroughUpdated GeoGebra Windows Portable from 5.2.909.9 to 5.4.913.0: bumped version, download URL, SHA256, and extract_dir; replaced HTML-scraping checkver with a PowerShell HEAD/redirect-based script that derives the dashVersion; adjusted checkver.regex to target 5.x versions. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Scoop as "Scoop (checkver)"
participant PS as "PowerShell script"
participant DG as "download.geogebra.org/package/win"
participant Installer as "redirect -> installers URL"
Scoop->>PS: invoke checkver script
PS->>DG: HTTP HEAD request to /package/win
DG-->>PS: 302 Redirect to installers URL
PS->>Installer: follow redirect URL
Installer-->>PS: respond with final URL containing dashVersion (e.g., 5-4-913-0)
PS->>Scoop: output version (dashVersion converted to dotted form)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All changes look good. Wait for review from human collaborators. geogebra5
|
|
/verify |
|
All changes look good. Wait for review from human collaborators. geogebra5
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@bucket/geogebra5.json`:
- Around line 47-49: The code disposes $response (and related objects) before
reading $response.RequestMessage.RequestUri.AbsoluteUri to set $package_name,
which can break the IDisposable contract; fix by extracting the URI into
$package_name (or a temp variable) from
$response.RequestMessage.RequestUri.AbsoluteUri before the disposal line that
disposes $response, $request, $client, $http_handler so the disposal happens
after the URI is captured.
🧹 Nitpick comments (1)
bucket/geogebra5.json (1)
47-51: Consider adding error handling for HTTP request failures.If the HTTP request fails or the response is unsuccessful, the script will silently produce incorrect output. Adding a status check would improve robustness.
Suggested improvement
"$response = $client.SendAsync($request).Result", +"if (-not $response.IsSuccessStatusCode) { throw \"HTTP request failed: $($response.StatusCode)\" }", "$redirected_uri = $response.RequestMessage.RequestUri.AbsoluteUri",
|
/verify |
|
All changes look good. Wait for review from human collaborators. geogebra5
|
|
/verify |
|
All changes look good. Wait for review from human collaborators. geogebra5
|
|
/verify |
|
All changes look good. Wait for review from human collaborators. geogebra5
|
|
/verify |
|
All changes look good. Wait for review from human collaborators. geogebra5
|
Summary
Updates
geogebra5to version 5.4.913.0 and modernizes thecheckverscript to use a more robust redirection-tracking logic.Related issues or pull requests
Changes
checkverscript:/5.2/directory) with a dynamicHEADrequest usingSystem.Net.Http.HttpClient./package/win) to resolve the actual filename and version string.System.Net.Http.Notes
checkverwas prone to failure when the major/minor version changed (e.g., moving from 5.2 to 5.4). The new implementation is version-agnostic and relies on the official redirection service provided by GeoGebra.HEADrequest instead of a fullGETrequest (Invoke-WebRequest) is more efficient as it only retrieves metadata without downloading the entire page content.Testing
The test results are as follows:
<manifest-name[@version]|chore>: <general summary of the pull request>Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.