You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you rely on this library, it would much appreciated if you can give back to the project in order to help
ensure its continued development.
Gold Sponsors
Silver Sponsors
Bronze Sponsors
Setting Up OctoFetch
If you want to create a downloader utility for a particular GitHub repository, you can use this library
to take care of all of the boilerplate, validation, and archive extraction. For example, if you want to create
a downloader for Litestream, you can do the following:
defmoduleLiteStream.DownloaderdouseOctoFetch,latest_version: "0.3.9",github_repo: "benbjohnson/litestream",download_versions: %{"0.3.9"=>[{:darwin,:amd64,"74599a34dc440c19544f533be2ef14cd4378ec1969b9b4fcfd24158946541869"},{:linux,:amd64,"806e1cca4a2a105a36f219a4c212a220569d50a8f13f45f38ebe49e6699ab99f"},{:linux,:arm64,"61acea9d960633f6df514972688c47fa26979fbdb5b4e81ebc42f4904394c5c5"}],"0.3.8"=>[{:darwin,:amd64,"d359a4edd1cb98f59a1a7c787bbd0ed30c6cc3126b02deb05a0ca501ff94a46a"},{:linux,:amd64,"530723d95a51ee180e29b8eba9fee8ddafc80a01cab7965290fb6d6fc31381b3"},{:linux,:arm64,"1d6fb542c65b7b8bf91c8859d99f2f48b0b3251cc201341281f8f2c686dd81e2"}]}# You must implement this function to generate the names of the downloads based on the# user's current running environment@impltruedefdownload_name(version,:darwin,arch),do: "litestream-v\#{version}-darwin-\#{arch}.zip"defdownload_name(version,:linux,arch),do: "litestream-v\#{version}-linux-\#{arch}.tar.gz"end
You would then be able to download the release artifact by doing the following: