Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

reduce binary size by skipping rclone

chrislu7a50762b9ed0
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 2ea755fca7..f237219870 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -34,7 +34,7 @@ jobs:
cd weed; go get -v -t -d ./...
- name: Build
- run: cd weed; go build -tags "elastic gocdk sqlite ydb tikv" -v .
+ run: cd weed; go build -tags "elastic gocdk sqlite ydb tikv rclone" -v .
- name: Test
- run: cd weed; go test -tags "elastic gocdk sqlite ydb tikv" -v ./...
+ run: cd weed; go test -tags "elastic gocdk sqlite ydb tikv rclone" -v ./...
diff --git a/Makefile b/Makefile
index 9ae877fa6d..fbe357db6a 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ warp_install:
go install github.com/minio/[email protected]
full_install:
- cd weed; go install -tags "elastic gocdk sqlite ydb tikv"
+ cd weed; go install -tags "elastic gocdk sqlite ydb tikv rclone"
server: install
weed -v 4 server -s3 -filer -volume.max=0 -master.volumeSizeLimitMB=1024 -volume.preStopSeconds=1 -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false -s3.config=./docker/compose/s3.json
@@ -32,4 +32,4 @@ benchmark_with_pprof: debug = 1
benchmark_with_pprof: benchmark
test:
- cd weed; go test -tags "elastic gocdk sqlite ydb tikv" -v ./...
\ No newline at end of file
+ cd weed; go test -tags "elastic gocdk sqlite ydb tikv rclone" -v ./...
diff --git a/weed/storage/backend/rclone_backend/dummy.go b/weed/storage/backend/rclone_backend/dummy.go
new file mode 100644
index 0000000000..721256a007
--- /dev/null
+++ b/weed/storage/backend/rclone_backend/dummy.go
@@ -0,0 +1 @@
+package rclone_backend
diff --git a/weed/storage/backend/rclone_backend/rclone_backend.go b/weed/storage/backend/rclone_backend/rclone_backend.go
index 55fde6456b..c634db048c 100644
--- a/weed/storage/backend/rclone_backend/rclone_backend.go
+++ b/weed/storage/backend/rclone_backend/rclone_backend.go
@@ -1,3 +1,6 @@
+//go:build rclone
+// +build rclone
+
package rclone_backend
import (
diff --git a/weed/storage/backend/rclone_backend/rclone_progress.go b/weed/storage/backend/rclone_backend/rclone_progress.go
index cf359ca400..738f33d825 100644
--- a/weed/storage/backend/rclone_backend/rclone_progress.go
+++ b/weed/storage/backend/rclone_backend/rclone_progress.go
@@ -1,3 +1,6 @@
+//go:build rclone
+// +build rclone
+
package rclone_backend
import "github.com/rclone/rclone/fs/accounting"