Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

cross-compile: make rclone-beta-latest* for download #1047

Nick Craig-Wood1ae604fcf4cf
diff --git a/Makefile b/Makefile
index a040067b8..09c4c0dd2 100644
--- a/Makefile
+++ b/Makefile
@@ -98,17 +98,15 @@ upload_github:
./bin/upload-github $(TAG)
cross: doc
- go run bin/cross-compile.go $(TAG)
+ go run bin/cross-compile.go -release current $(TAG)
beta:
go run bin/cross-compile.go $(TAG)β
- rm build/*-current-*
rclone -v copy build/ memstore:pub-rclone-org/$(TAG)β
@echo Beta release ready at http://pub.rclone.org/$(TAG)%CE%B2/
travis_beta:
- go run bin/cross-compile.go $(TAG)β
- rm build/*-current-*
+ go run bin/cross-compile.go -release latest-beta $(TAG)β
rclone --config bin/travis.rclone.conf -v copy build/ memstore:beta-rclone-org/$(TAG)
@echo Beta release ready at $(BETA_URL)
diff --git a/bin/cross-compile.go b/bin/cross-compile.go
index 3fa65a669..febae5a6b 100644
--- a/bin/cross-compile.go
+++ b/bin/cross-compile.go
@@ -20,6 +20,7 @@ var (
// Flags
debug = flag.Bool("d", false, "Print commands instead of running them.")
parallel = flag.Int("parallel", runtime.NumCPU(), "Number of commands to run in parallel.")
+ copyAs = flag.String("release", "", "Make copies of the releases with this name")
)
// GOOS/GOARCH pairs we build for
@@ -99,8 +100,10 @@ func compileArch(version, goos, goarch, dir string) {
run("cp", "-a", "../rclone.1", dir)
zip := dir + ".zip"
run("zip", "-r9", zip, dir)
- currentZip := strings.Replace(zip, "-"+version, "-current", 1)
- run("ln", zip, currentZip)
+ if *copyAs != "" {
+ copyAsZip := strings.Replace(zip, "-"+version, "-"+*copyAs, 1)
+ run("ln", zip, copyAsZip)
+ }
run("rm", "-rf", dir)
log.Printf("Done compiling %s/%s", goos, goarch)
}