Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better installations #234

Open
ghostsquad opened this issue Apr 1, 2019 · 6 comments
Open

Better installations #234

ghostsquad opened this issue Apr 1, 2019 · 6 comments

Comments

@ghostsquad
Copy link

It would be nice if mage was distributed in other ways like brew, apt, apk, yum, chocolatey. This would make installation trivial.

@natefinch
Copy link
Member

So, yes, that's a good idea. But...

Mage requires go to be available. Go can download and install mage (and mage has no external dependencies, so you don't even need to worry about dependency management), so it's generally not a big deal for most uses.

Is this just a general "this would be a good idea" request, or is there a problem you're having that needs a better solution? Knowing that can help me prioritize the issue.

@ghostsquad
Copy link
Author

ghostsquad commented Apr 5, 2019

The default instructions are kind of ominous from a security or "what did it just do?" standpoint. Honestly, I don't know what bootstrap actually does. Being able to download/install the binary easily without extracting it from a tar would be great. Just thinking of the best way to get up and running quickly, easily and reliably both locally and in a ci/cd environment.

go get -u -d github.com/magefile/mage 
cd $GOPATH/src/github.com/magefile/mage
go run bootstrap.go 

@ntrrg
Copy link
Contributor

ntrrg commented Apr 6, 2019

Did you try https://magefile.org/zeroinstall/? You don't need to download any file in this way and you can manage versions with modules or dep.

If you don't want to type go run mage.go -v test you could create a shell script like:

mage (or any name you want):

#!/bin/sh

exec go run mage.go $@

And just type ./mage -v test. For Travis you could do this:

.travis.yml:

os: linux
dist: xenial
git:
  depth: 1
language: go
go: "1.12.2"
env:
  - GO111MODULE=on
script: ./mage -v test

@ghostsquad
Copy link
Author

Good information. I will use this. Thank you

@kostrse
Copy link

kostrse commented Oct 12, 2021

Now, besides brew (#288), it also available in scoop (#375) for Windows users.

Linux/MacOS

brew install mage

Windows

scoop install mage

@sheldonhull
Copy link

The default instructions are kind of ominous from a security or "what did it just do?" standpoint. Honestly, I don't know what bootstrap actually does. Being able to download/install the binary easily without extracting it from a tar would be great. Just thinking of the best way to get up and running quickly, easily and reliably both locally and in a ci/cd environment.

go get -u -d github.com/magefile/mage 
cd $GOPATH/src/github.com/magefile/mage
go run bootstrap.go 

FYI, I just run go install github.com/magefile/mage@latest. I know it's not the "supported option", but if I care about opening an issue I can install manually. Having as an go install means all in all my repos I don't worry about bootstraping mage. I just run go run mage.go init and from that point on mage and mage-select are available along with all my standard go tools. It's worked great for me and is my go to as it works the same on Linux, mac, and Windows.

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

No branches or pull requests

5 participants