Skip to content

Commit bdc92f6

Browse files
chore(docs): updated README and site to include installation using go install command (#499)
* chore(docs): updated README and site index with installation guide
1 parent 32e0107 commit bdc92f6

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,27 @@ and Mage automatically uses them as Makefile-like runnable targets.
1313
Mage has no dependencies outside the Go standard library, and builds with Go 1.7
1414
and above (possibly even lower versions, but they're not regularly tested).
1515

16-
**Using GOPATH**
16+
**Using GOPATH with go version < 1.17**
1717

1818
```
1919
go get -u -d github.com/magefile/mage
2020
cd $GOPATH/src/github.com/magefile/mage
2121
go run bootstrap.go
2222
```
2323

24+
**Using Go Install with go version >= 1.18**
25+
26+
```
27+
go install github.com/magefile/mage@latest
28+
mage -init
29+
```
30+
31+
Instead of the @latest tag, you can specify the desired version, for example:
32+
33+
```
34+
go install github.com/magefile/[email protected]
35+
```
36+
2437
**Using Go Modules**
2538

2639
```

site/content/index.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,26 @@ and Mage automatically uses them as Makefile-like runnable targets.
1414
Mage has no dependencies outside the Go standard library, and builds with Go 1.7
1515
and above (possibly even lower versions, but they're not regularly tested).
1616

17-
#### Using Go Modules (Recommended)
17+
#### Using Go Modules (With go version < 1.17)
1818

1919
```plain
2020
git clone https://github.com/magefile/mage
2121
cd mage
2222
go run bootstrap.go
2323
```
2424

25+
#### Using Go Install (With go version >= [1.17](https://go.dev/doc/go-get-install-deprecation))
26+
27+
```plain
28+
go install github.com/magefile/mage@latest
29+
mage -init
30+
```
31+
Instead of the @latest tag, you can specify the desired version, for example:
32+
33+
```plain
34+
go install github.com/magefile/[email protected]
35+
```
36+
2537
#### Using GOPATH
2638

2739
```plain

0 commit comments

Comments
 (0)