magefile / mage

a Make/rake-like dev tool using Go
https://magefile.org
Apache License 2.0
4.01k stars 250 forks source link

enhancement: add script to install from GitHub releases #477

Open smsunarto opened 10 months ago

smsunarto commented 10 months ago

Describe the feature Currently, users would have to go to the GitHub release page, download the correct package, and manually install it on their system.

Using an installer script created via https://github.com/jpillora/installer, you can simply provide an endpoint to curl into and the script will do the rest of the heavy lifting. This is similar to what is used by https://rustup.rs, which makes it easy to install the Rust toolchain

Installer is an HTTP server which returns shell scripts. The returned script will detect platform OS and architecture, choose from a selection of URLs, download the appropriate file, un(zip|tar|gzip) the file, find the binary (largest file) and optionally move it into your PATH. Useful for installing your favourite pre-compiled programs on hosts using only curl.

Ex:

curl https://install.magefile.org/<release>! | bash

On a side note, it might be a good idea to highlight this (and package managers) as the preferred way to install magefile (instead of installing from source, which I doubt most devs need). Building from source (especially directly from the main branch instead of releases) puts more pressure on developing in main without breaking someone's setup.

What problem does this feature address?