@@ -7,21 +7,22 @@ title = "Mage"
7
7
Mage is a make/rake-like build tool using Go. You write plain-old go functions,
8
8
and Mage automatically uses them as Makefile-like runnable targets.
9
9
10
-
11
10
## Installation
12
11
12
+ ### From GitHub source (any OS)
13
+
13
14
Mage has no dependencies outside the Go standard library, and builds with Go 1.7
14
- and above (possibly even lower versions, but they're not regularly tested).
15
+ and above (possibly even lower versions, but they're not regularly tested).
15
16
16
- ** Using Go Modules (Recommended)**
17
+ #### Using Go Modules (Recommended)
17
18
18
19
``` plain
19
20
git clone https://github.com/magefile/mage
20
21
cd mage
21
22
go run bootstrap.go
22
23
```
23
24
24
- ** Using GOPATH**
25
+ #### Using GOPATH
25
26
26
27
``` plain
27
28
go get -u -d github.com/magefile/mage
@@ -33,14 +34,28 @@ This will download the code into your GOPATH, and then run the bootstrap script
33
34
to build mage with version infomation embedded in it. A normal ` go get `
34
35
(without -d) will build the binary correctly, but no version info will be
35
36
embedded. If you've done this, no worries, just go to
36
- $GOPATH/src/github.com/magefile/mage and run ` mage install ` or `go run
37
+ ` $GOPATH/src/github.com/magefile/mage ` and run ` mage install ` or `go run
37
38
bootstrap.go` and a new binary will be created with the correct version
38
39
information.
39
40
40
41
The mage binary will be created in your $GOPATH/bin directory.
41
42
43
+ ### From GitHub releases (any OS)
44
+
42
45
You may also install a binary release from our
43
- [ releases] ( https://github.com/magefile/mage/releases ) page.
46
+ [ releases] ( https://github.com/magefile/mage/releases ) page.
47
+
48
+ ### With Homebrew (MacOS)
49
+
50
+ ` brew install mage `
51
+
52
+ See [ mage homebrew formula] ( https://formulae.brew.sh/formula/mage ) .
53
+
54
+ ### With Scoop (Windows)
55
+
56
+ ` scoop install mage `
57
+
58
+ See [ scoop] ( https://scoop.sh/ ) .
44
59
45
60
## Example Magefile
46
61
@@ -72,14 +87,14 @@ Run the above `Build` target by simply running `mage build` in the same director
72
87
73
88
Join the ` #mage ` channel on [ gophers slack] ( https://gophers.slack.com/messages/general/ ) for discussion of usage, development, etc.
74
89
75
-
76
90
## Plugins
77
91
78
92
There are no plugins. You don't need plugins. It's just Go code. You can
79
93
import whatever libraries you want. Every library in the go ecosystem is a mage
80
94
plugin. Every tool you use with Go can be used with Magefiles.
81
95
82
96
## Usage
97
+
83
98
``` plain
84
99
mage [options] [target]
85
100
@@ -101,7 +116,7 @@ Options:
101
116
-f force recreation of compiled magefile
102
117
-goarch sets the GOARCH for the binary created by -compile (default: current arch)
103
118
-gocmd <string>
104
- use the given go binary to compile the output (default: "go")
119
+ use the given go binary to compile the output (default: "go")
105
120
-goos sets the GOOS for the binary created by -compile (default: current OS)
106
121
-h show description of a target
107
122
-keep keep intermediate mage files around after running
@@ -110,7 +125,7 @@ Options:
110
125
-v show verbose output when running mage targets
111
126
-w <string>
112
127
working directory where magefiles will run (default -d value)
113
- ```
128
+ ```
114
129
115
130
## Why?
116
131
0 commit comments