"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
Stop doing vendoring - fixes #4032
Nick Craig-Woodd1617ce7ceb0
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 6dd8ddbe7..2c2a3d2b4 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -19,13 +19,13 @@ jobs:strategy:fail-fast: falsematrix:- job_name: ['linux', 'mac', 'windows_amd64', 'windows_386', 'other_os', 'modules_race', 'go1.11', 'go1.12', 'go1.13']+ job_name: ['linux', 'mac', 'windows_amd64', 'windows_386', 'other_os', 'race', 'go1.11', 'go1.12', 'go1.13']include:- job_name: linuxos: ubuntu-latestgo: '1.14.x'- modules: 'off'+ modules: 'on'gotags: cmountbuild_flags: '-include "^linux/"'check: true@@ -35,7 +35,7 @@ jobs:- job_name: macos: macOS-latestgo: '1.14.x'- modules: 'off'+ modules: 'on'gotags: '' # cmount doesn't work on osx travis for some reasonbuild_flags: '-include "^darwin/amd64" -cgo'quicktest: true@@ -45,7 +45,7 @@ jobs:- job_name: windows_amd64os: windows-latestgo: '1.14.x'- modules: 'off'+ modules: 'on'gotags: cmountbuild_flags: '-include "^windows/amd64" -cgo'quicktest: true@@ -55,7 +55,7 @@ jobs:- job_name: windows_386os: windows-latestgo: '1.14.x'- modules: 'off'+ modules: 'on'gotags: cmountgoarch: '386'cgo: '1'@@ -66,12 +66,12 @@ jobs:- job_name: other_osos: ubuntu-latestgo: '1.14.x'- modules: 'off'+ modules: 'on'build_flags: '-exclude "^(windows/|darwin/amd64|linux/)"'compile_all: truedeploy: true- - job_name: modules_race+ - job_name: raceos: ubuntu-latestgo: '1.14.x'modules: 'on'@@ -81,19 +81,19 @@ jobs:- job_name: go1.11os: ubuntu-latestgo: '1.11.x'- modules: 'off'+ modules: 'on'quicktest: true- job_name: go1.12os: ubuntu-latestgo: '1.12.x'- modules: 'off'+ modules: 'on'quicktest: true- job_name: go1.13os: ubuntu-latestgo: '1.13.x'- modules: 'off'+ modules: 'on'quicktest: truename: ${{ matrix.job_name }}@@ -244,7 +244,7 @@ jobs:- name: Build rclonerun: |docker pull golang- docker run --rm -v "$PWD":/usr/src/rclone -w /usr/src/rclone golang go build -mod=vendor -v+ docker run --rm -v "$PWD":/usr/src/rclone -w /usr/src/rclone golang go build -mod=mod -v- name: Upload artifactsrun: |diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 85fbce96a..32a86b027 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -186,7 +186,6 @@ with modules beneath.* pacer - retries with backoff and paces operations* readers - a selection of useful io.Readers* rest - a thin abstraction over net/http for REST- * vendor - 3rd party code managed by `go mod`* vfs - Virtual FileSystem layer for implementing rclone mount and similar## Writing Documentation ##@@ -266,41 +265,25 @@ rclone uses the [gomodules](https://tip.golang.org/cmd/go/#hdr-Modules__module_versions__and_more)support in go1.11 and later to manage its dependencies.-**NB** you must be using go1.11 or above to add a dependency to-rclone. Rclone will still build with older versions of go, but we use-the `go mod` command for dependencies which is only in go1.11 and-above.--rclone can be built with modules outside of the GOPATH, but for-backwards compatibility with older go versions, rclone also maintains-a `vendor` directory with all the external code rclone needs for-building.--The `vendor` directory is entirely managed by the `go mod` tool, do-not add things manually.+rclone can be built with modules outside of the GOPATHTo add a dependency `github.com/ncw/new_dependency` see the-instructions below. These will fetch the dependency, add it to-`go.mod` and `go.sum` and vendor it for older go versions.+instructions below. These will fetch the dependency and add it to+`go.mod` and `go.sum`.GO111MODULE=on go get github.com/ncw/new_dependency- GO111MODULE=on go mod vendorYou can add constraints on that package when doing `go get` (see thego docs linked above), but don't unless you really need to.-Please check in the changes generated by `go mod` including the-`vendor` directory and `go.mod` and `go.sum` in a single commit-separate from any other code changes with the title "vendor: add-github.com/ncw/new_dependency". Remember to `git add` any new files-in `vendor`.+Please check in the changes generated by `go mod` including `go.mod`+and `go.sum` in the same commit as your other changes.## Updating a dependency ##If you need to update a dependency then runGO111MODULE=on go get -u github.com/pkg/errors- GO111MODULE=on go mod vendorCheck in a single commit as above.diff --git a/Makefile b/Makefileindex 4cd3db648..cbe442426 100644--- a/Makefile+++ b/Makefile@@ -27,7 +27,7 @@ ifndef RELEASE_TAGTAG := $(TAG)-betaendifGO_VERSION := $(shell go version)-GO_FILES := $(shell go list ./... | grep -v /vendor/ )+GO_FILES := $(shell go list ./... )ifdef BETA_SUBDIRBETA_SUBDIR := /$(BETA_SUBDIR)endif@@ -100,15 +100,19 @@ release_dep_windows:GO111MODULE=off GOOS="" GOARCH="" go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo# Update dependencies+showupdates:+ @echo "*** Direct dependencies that could be updated ***"+ @GO111MODULE=on go list -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}' -m all 2> /dev/null++# Update direct and indirect dependencies and test dependenciesupdate:- GO111MODULE=on go get -u ./...+ GO111MODULE=on go get -u -t ./...+ -#GO111MODULE=on go get -d $(go list -m -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' all)GO111MODULE=on go mod tidy- GO111MODULE=on go mod vendor# Tidy the module dependenciestidy:GO111MODULE=on go mod tidy- GO111MODULE=on go mod vendordoc: rclone.1 MANUAL.html MANUAL.txt rcdocs commanddocsdiff --git a/RELEASE.md b/RELEASE.mdindex 39cf9c820..57bcef32f 100644--- a/RELEASE.md+++ b/RELEASE.md@@ -33,7 +33,7 @@ This file describes how to make the various kinds of releases* make startdev* # announce with forum post, twitter post, patreon post-Early in the next release cycle update the vendored dependencies+Early in the next release cycle update the dependencies* Review any pinned packages in go.mod and remove if possible* make update@@ -53,7 +53,6 @@ Can be fixed with* GO111MODULE=on go get -u github.com/russross/[email protected]* GO111MODULE=on go mod tidy- * GO111MODULE=on go mod vendor## Making a point releasediff --git a/docs/content/install.md b/docs/content/install.mdindex 3803f0fbc..1bfdd74b4 100644--- a/docs/content/install.md+++ b/docs/content/install.md@@ -174,7 +174,7 @@ kill %1## Install from source ##-Make sure you have at least [Go](https://golang.org/) 1.10+Make sure you have at least [Go](https://golang.org/) 1.11installed. [Download go](https://golang.org/dl/) if necessary. Thelatest release is recommended. Then@@ -183,16 +183,14 @@ latest release is recommended. Thengo build./rclone version-You can also build and install rclone in the-[GOPATH](https://github.com/golang/go/wiki/GOPATH) (which defaults to-`~/go`) with:+This will leave you a checked out version of rclone you can modify.++You can also build rclone with:go get -u -v github.com/rclone/rcloneand this will build the binary in `$GOPATH/bin` (`~/go/bin/rclone` by-default) after downloading the source to-`$GOPATH/src/github.com/rclone/rclone` (`~/go/src/github.com/rclone/rclone`-by default).+default) after downloading the source to the go module cache..## Installation with Ansible ##