diff --git a/README.md b/README.md index d96fd02..075c14a 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ and Mage automatically uses them as Makefile-like runnable targets. 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). -**Using GOPATH** +**Using GOPATH with go version < 1.17** ``` go get -u -d github.com/magefile/mage @@ -21,6 +21,19 @@ cd $GOPATH/src/github.com/magefile/mage go run bootstrap.go ``` +**Using Go Install with go version >= 1.18** + +``` +go install github.com/magefile/mage@latest +mage -init +``` + +Instead of the @latest tag, you can specify the desired version, for example: + +``` +go install github.com/magefile/mage@v1.15.0 +``` + **Using Go Modules** ``` diff --git a/site/content/index.md b/site/content/index.md index 6f3f7a6..5e0fba2 100644 --- a/site/content/index.md +++ b/site/content/index.md @@ -14,7 +14,7 @@ and Mage automatically uses them as Makefile-like runnable targets. 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). -#### Using Go Modules (Recommended) +#### Using Go Modules (With go version < 1.17) ```plain git clone https://github.com/magefile/mage @@ -22,6 +22,18 @@ cd mage go run bootstrap.go ``` +#### Using Go Install (With go version >= [1.17](https://go.dev/doc/go-get-install-deprecation)) + +```plain +go install github.com/magefile/mage@latest +mage -init +``` +Instead of the @latest tag, you can specify the desired version, for example: + +```plain +go install github.com/magefile/mage@v1.15.0 +``` + #### Using GOPATH ```plain