docs: update install from source instructions

This has changed post Go modules.

In particular it recommends against the go get `-u` flag.

See: https://forum.rclone.org/t/install-from-source-go-get-errors/18114
This commit is contained in:
Nick Craig-Wood 2020-07-27 11:47:46 +01:00
parent 711736054f
commit 4afea1ebaf

View File

@ -183,14 +183,23 @@ latest release is recommended. Then
go build
./rclone version
This will leave you a checked out version of rclone you can modify.
This will leave you a checked out version of rclone you can modify and
send pull requests with. If you use `make` instead of `go build` then
the rclone build will have the correct version information in it.
You can also build rclone with:
You can also build the latest stable rclone with:
go get -u -v github.com/rclone/rclone
go get github.com/rclone/rclone
and this will build the binary in `$GOPATH/bin` (`~/go/bin/rclone` by
default) after downloading the source to the go module cache..
or the latest version (equivalent to the beta) with
go get github.com/rclone/rclone@master
These will build the binary in `$(go env GOPATH)/bin`
(`~/go/bin/rclone` by default) after downloading the source to the go
module cache. Note - do **not** use the `-u` flag here. This causes go
to try to update the depencencies that rclone uses and sometimes these
don't work with the current version of rclone.
## Installation with Ansible ##