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

#288 add brew and scoop install to docs #376

Merged
merged 2 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions site/content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,22 @@ title = "Mage"
Mage is a make/rake-like build tool using Go. You write plain-old go functions,
and Mage automatically uses them as Makefile-like runnable targets.


## Installation

### From GitHub source (any OS)

Mage has no dependencies outside the Go standard library, and builds with Go 1.7
and above (possibly even lower versions, but they're not regularly tested).
and above (possibly even lower versions, but they're not regularly tested).

**Using Go Modules (Recommended)**
#### Using Go Modules (Recommended)

```plain
git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go
```

**Using GOPATH**
#### Using GOPATH

```plain
go get -u -d github.com/magefile/mage
Expand All @@ -33,14 +34,28 @@ This will download the code into your GOPATH, and then run the bootstrap script
to build mage with version infomation embedded in it. A normal `go get`
(without -d) will build the binary correctly, but no version info will be
embedded. If you've done this, no worries, just go to
$GOPATH/src/github.com/magefile/mage and run `mage install` or `go run
`$GOPATH/src/github.com/magefile/mage` and run `mage install` or `go run
bootstrap.go` and a new binary will be created with the correct version
information.

The mage binary will be created in your $GOPATH/bin directory.

### From GitHub releases (any OS)

You may also install a binary release from our
[releases](https://github.com/magefile/mage/releases) page.
[releases](https://github.com/magefile/mage/releases) page.

### With Homebrew (MacOS)

`brew install mage`

See [mage homebrew formula](https://formulae.brew.sh/formula/mage).

### With Scoop (Windows)

`scoop install mage`

See [scoop](https://scoop.sh/).

## Example Magefile

Expand Down Expand Up @@ -72,14 +87,14 @@ Run the above `Build` target by simply running `mage build` in the same director

Join the `#mage` channel on [gophers slack](https://gophers.slack.com/messages/general/) for discussion of usage, development, etc.


## Plugins

There are no plugins. You don't need plugins. It's just Go code. You can
import whatever libraries you want. Every library in the go ecosystem is a mage
plugin. Every tool you use with Go can be used with Magefiles.

## Usage

```plain
mage [options] [target]

Expand All @@ -101,7 +116,7 @@ Options:
-f force recreation of compiled magefile
-goarch sets the GOARCH for the binary created by -compile (default: current arch)
-gocmd <string>
use the given go binary to compile the output (default: "go")
use the given go binary to compile the output (default: "go")
-goos sets the GOOS for the binary created by -compile (default: current OS)
-h show description of a target
-keep keep intermediate mage files around after running
Expand All @@ -110,7 +125,7 @@ Options:
-v show verbose output when running mage targets
-w <string>
working directory where magefiles will run (default -d value)
```
```

## Why?

Expand Down
4 changes: 2 additions & 2 deletions site/content/zeroInstall/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Now you can `go run mage.go <target>` and it'll work just as if you ran
package main

import (
"os"
"github.com/magefile/mage/mage"
"os"
"github.com/magefile/mage/mage"
)

func main() { os.Exit(mage.Main()) }
Expand Down