magefile / mage

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

Better installations #234

Open ghostsquad opened 5 years ago

ghostsquad commented 5 years ago

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

natefinch commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Good information. I will use this. Thank you

kostrse commented 2 years ago

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

Linux/MacOS

brew install mage

Windows

scoop install mage
sheldonhull commented 2 years ago

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.