build: add build tag noselfupdate

Allow downstream packaging to build rclone without selfupdate command:
$ go build -tags noselfupdate

Fixes #5187
This commit is contained in:
Ivan Andreev 2021-04-03 14:39:04 +03:00
parent 7df57cd625
commit 9eab258ffb
12 changed files with 37 additions and 2 deletions

View file

@ -0,0 +1,7 @@
// +build !noselfupdate
package cmd
// This constant must be in the `cmd` package rather than `cmd/selfupdate`
// to prevent build failure due to dependency loop.
const selfupdateEnabled = true