Skip to content

feat: support ubuntu-22.04 install#11

Merged
younke merged 8 commits intomasterfrom
feat/ubuntu-22.04
Dec 27, 2025
Merged

feat: support ubuntu-22.04 install#11
younke merged 8 commits intomasterfrom
feat/ubuntu-22.04

Conversation

@younke
Copy link
Copy Markdown
Owner

@younke younke commented Dec 27, 2025

Add Ubuntu 22.04 Support

Summary

This PR adds support for installing Sourcery on Ubuntu 22.04 LTS systems.

Changes

lib/utils.bash

  • Added get_platform() - Detects the current platform by checking uname -s and parsing /etc/os-release on Linux

    • Returns macos for Darwin systems
    • Returns ubuntu-22.04 for Ubuntu 22.04 systems
    • Fails with clear error on unsupported systems
  • Added get_ubuntu_asset_url() - Dynamically fetches the Ubuntu release asset URL from the GitHub API

    • Detects processor architecture via uname -m (supports x86_64, aarch64)
    • Matches assets with pattern *ubuntu*22.04*{arch}*.tar.xz
    • Returns the browser_download_url from the release assets
  • Updated download_release() - Uses platform-specific download URLs:

    • macOS: sourcery-{version}.zip
    • Ubuntu: dynamically resolved from GitHub API

bin/download

  • Added platform detection to select correct archive extension (.zip vs .tar.xz)
  • Added platform-specific extraction commands:
    • macOS: unzip
    • Ubuntu: tar -xf

.github/workflows/build.yml

  • Extended CI to use matrix strategy, running plugin tests on both macos-latest and ubuntu-22.04

Why Dynamic URL Resolution?

The Ubuntu asset naming varies across Sourcery releases (e.g., ubuntu-22.04.4 in 2.2.5 vs ubuntu-22.04.5 in 2.2.6). Instead of hardcoding the asset name, we query the GitHub API to find the correct download URL for each version.

Limitations

  • Only Ubuntu 22.04 is supported on Linux
  • Other Linux distributions will fail with a clear error message

Testing

  • shellcheck passes
  • CI passes on macOS
  • CI passes on Ubuntu 22.04

@younke younke self-assigned this Dec 27, 2025
@younke younke merged commit e1aab7d into master Dec 27, 2025
6 checks passed
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.

1 participant