Skip to content

Conversation

@matiasdaloia
Copy link
Collaborator

@matiasdaloia matiasdaloia commented Nov 6, 2025

Summary by CodeRabbit

  • New Features
    • Linux installer now detects distro/version and selects an appropriate WebKit variant (Ubuntu ≥24 and Debian ≥13 get WebKit 4.0).
    • Download flow supports multiple WebKit variants so installers fetch the correct asset for the system.
    • Installed binary names include the chosen WebKit variant to clearly reflect the runtime used.

@matiasdaloia matiasdaloia self-assigned this Nov 6, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 6, 2025

Walkthrough

The 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

Cohort / File(s) Summary
WebKit variant selection & binary naming
scripts/install-linux.sh
Adds WEBKIT variable with distro/version detection to choose the WebKit variant; passes amd64 and the WEBKIT value into the asset download call; constructs final binary name as "$APP_NAME-linux-amd64-$WEBKIT".
Asset URL resolution with WebKit parameter
scripts/lib/github-api.sh
Adds optional webkit parameter (default webkit40) to get_asset_url and download_and_verify_asset; updates Linux asset filename pattern to include $arch and $webkit (e.g., scanoss-cc-linux-$arch-$webkit.zip) and threads webkit through URL resolution.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Check distro detection logic and version comparisons for correctness.
  • Verify all callers (internal or external) of get_asset_url / download_and_verify_asset handle the new webkit parameter or rely on its default.
  • Confirm binary naming and any downstream references (install, checksum, cleanup) use the new $WEBKIT suffix consistently.

Possibly related PRs

Suggested reviewers

  • isasmendiagus

Poem

🐇 In a burrow of scripts I hop and sing,
WebKit flags now fit each Linux ring,
I thread the name through URL and file,
Downloaded, verified — I nibble with style,
Hooray for binaries, tidy and spry! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix: linux installation download url script' is vague and doesn't clearly convey the main change, which is adding WebKit versioning support to the Linux installer. Consider a more specific title like 'fix: support WebKit variant selection in Linux installer' or 'fix: parameterize WebKit version in Linux installation script' to better reflect the actual changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/mdaloia/linux-installation-script

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 20257da and e364fae.

📒 Files selected for processing (1)
  • scripts/lib/github-api.sh (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/lib/github-api.sh
⏰ 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

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

SCANOSS SCAN Completed 🚀

  • Detected components: 3
  • Undeclared components: 0
  • Declared components: 3
  • Detected files: 185
  • Detected files undeclared: 0
  • Detected files declared: 185
  • Licenses detected: 2
  • Licenses detected with copyleft: 1
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between cb0698d and 20257da.

📒 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 $arch and $webkit variables. Verify that GitHub releases are actually publishing binaries with this naming scheme (e.g., scanoss-cc-linux-amd64-webkit40.zip and scanoss-cc-linux-amd64-webkit41.zip).

scripts/install-linux.sh (5)

12-12: WEBKIT variable initialized with default.

Good initialization to webkit40 as 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_asset correctly passes the new amd64 and $WEBKIT arguments as the 4th and 5th positional parameters, matching the function signature in scripts/lib/github-api.sh (line 169).


30-53: Verify distro detection robustness.

The detect_distro and detect_distro_version functions extract values from /etc/os-release. Confirm that both ID and VERSION_ID are reliably set across target distributions (Ubuntu 24+, Debian 13+, and others).

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

SCANOSS SCAN Completed 🚀

  • Detected components: 3
  • Undeclared components: 0
  • Declared components: 3
  • Detected files: 185
  • Detected files undeclared: 0
  • Detected files declared: 185
  • Licenses detected: 2
  • Licenses detected with copyleft: 1
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

@matiasdaloia matiasdaloia merged commit c2dc3b4 into main Nov 6, 2025
6 checks passed
@matiasdaloia matiasdaloia deleted the fix/mdaloia/linux-installation-script branch November 6, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants