Module: Thermite::GithubReleaseBinary
- Included in:
- Tasks
- Defined in:
- lib/thermite/github_release_binary.rb
Overview
GitHub releases binary helpers.
Instance Method Summary collapse
-
#download_binary_from_github_release ⇒ Object
Downloads a Rust binary from GitHub releases, given the target OS and architecture.
Instance Method Details
#download_binary_from_github_release ⇒ Object
Downloads a Rust binary from GitHub releases, given the target OS and architecture.
Requires the github_releases option to be true. It uses the repository value in the
project's Cargo.toml (in the package section) to determine where the releases
are located.
If the github_release_type is 'latest', it will attempt to use the appropriate binary for
the latest version in GitHub releases. Otherwise, it will download the appropriate binary for
the crate version given in Cargo.toml.
Returns whether a binary was found and unpacked.
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/thermite/github_release_binary.rb', line 43 def download_binary_from_github_release return false unless [:github_releases] case [:github_release_type] when 'latest' download_latest_binary_from_github_release else # 'cargo' download_cargo_version_from_github_release end end |