-
Notifications
You must be signed in to change notification settings - Fork 3
fix: linux installation download url script #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe change adds a WEBKIT variable and distro-aware selection to the Linux installer, threads the chosen WebKit variant through asset resolution and download calls, and updates binary naming to include the WebKit variant. Changes
Sequence Diagram(s)sequenceDiagram
participant Installer as install-linux.sh
participant API as github-api.sh
participant GH as GitHub Assets
Installer->>Installer: Detect distro & version
rect rgb(230, 245, 255)
note right of Installer: Select WEBKIT variant\n(e.g., webkit40)
end
Installer->>API: download_and_verify_asset(arch="amd64", webkit=$WEBKIT)
API->>API: Build asset pattern\nscanoss-cc-linux-amd64-$webkit.zip
API->>GH: Request asset URL with pattern
GH-->>API: Return asset URL
API-->>Installer: Download and verify asset
Installer->>Installer: Rename to $APP_NAME-linux-amd64-$WEBKIT
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
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 |
SCANOSS SCAN Completed 🚀
View more details on SCANOSS Action Summary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
scripts/install-linux.sh(3 hunks)scripts/lib/github-api.sh(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
scripts/install-linux.sh (1)
scripts/lib/github-api.sh (1)
download_and_verify_asset(164-187)
🪛 Shellcheck (0.11.0)
scripts/lib/github-api.sh
[warning] 172-172: Declare and assign separately to avoid masking return values.
(SC2155)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (7)
scripts/lib/github-api.sh (2)
13-13: Webkit parameter with sensible default.Good use of parameter expansion with default value to maintain backward compatibility.
24-24: Linux asset pattern updated to include architecture and webkit variant.The asset pattern correctly incorporates both
$archand$webkitvariables. Verify that GitHub releases are actually publishing binaries with this naming scheme (e.g.,scanoss-cc-linux-amd64-webkit40.zipandscanoss-cc-linux-amd64-webkit41.zip).scripts/install-linux.sh (5)
12-12: WEBKIT variable initialized with default.Good initialization to
webkit40as the fallback for older or unsupported distributions.
68-70: Distro-aware webkit version selection logic is sound.The condition correctly detects Ubuntu ≥24 or Debian ≥13 using major version extraction (
${distro_version%%.*}). The operator precedence is correct: condition AND (optionA OR optionB).
72-76: BINARY_NAME updated to reflect selected WebKit variant.The dynamic binary name construction ensures alignment with the asset naming scheme from
scripts/lib/github-api.sh(line 24). The webkit package is selected correctly based on the WEBKIT variable.
154-154: Function call parameters passed in correct order.The call to
download_and_verify_assetcorrectly passes the newamd64and$WEBKITarguments as the 4th and 5th positional parameters, matching the function signature inscripts/lib/github-api.sh(line 169).
30-53: Verify distro detection robustness.The
detect_distroanddetect_distro_versionfunctions extract values from/etc/os-release. Confirm that bothIDandVERSION_IDare reliably set across target distributions (Ubuntu 24+, Debian 13+, and others).
SCANOSS SCAN Completed 🚀
View more details on SCANOSS Action Summary |
Summary by CodeRabbit