From 7a70355b6d81e5c67437fc2952e4aa7ac257ac2d Mon Sep 17 00:00:00 2001 From: Daniel Arroyo Date: Thu, 9 Jul 2026 15:00:40 -0400 Subject: [PATCH] Bump version to 1.0.19 --- Makefile | 2 +- cmd/server/main.go | 2 +- internal/syncengine/rsync_runner.go | 31 +---------------------------- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index 7665584..4baa1d3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ BINARY=syncserver -VERSION?=1.0.18 +VERSION?=1.0.19 GO?=go LDFLAGS=-s -w -X main.version=$(VERSION) -X main.commit=$(shell git rev-parse --short HEAD 2>/dev/null || echo unknown) BUILD_FLAGS=CGO_ENABLED=0 diff --git a/cmd/server/main.go b/cmd/server/main.go index ff47302..b0d49a9 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -20,7 +20,7 @@ import ( "github.com/syncserver/internal/syncengine" ) -var version = "1.0.18" +var version = "1.0.19" func main() { cfgPath := flag.String("config", "", "Path to config.yaml") diff --git a/internal/syncengine/rsync_runner.go b/internal/syncengine/rsync_runner.go index 12c9bba..a8d87f7 100644 --- a/internal/syncengine/rsync_runner.go +++ b/internal/syncengine/rsync_runner.go @@ -157,29 +157,6 @@ func (r *RsyncRunner) buildArgs(pair *SyncPairConfig) []string { return args } -func (r *RsyncRunner) buildRemoteArgs(pair *SyncPairConfig) []string { - var args []string - - flags := strings.Fields(pair.RsyncFlags) - args = append(args, flags...) - - for _, pattern := range pair.ExcludePatterns { - args = append(args, "--exclude="+pattern) - } - - if pair.Direction == "mirror" { - args = append(args, "--delete") - } - - if pair.Direction == "pull" { - args = append(args, pair.Dest, pair.Source) - } else { - args = append(args, pair.Source, pair.Dest) - } - - return args -} - type RemoteMachine struct { Host string Port int @@ -205,19 +182,13 @@ func (r *RsyncRunner) RunRemote(ctx context.Context, pair *SyncPairConfig, remot } sshArgs := []string{ - "ssh", "-i", remote.PrivKey, "-o", "StrictHostKeyChecking=accept-new", "-o", "UserKnownHostsFile=" + strings.TrimRight(r.sshDir, "/") + "/known_hosts", "-p", fmt.Sprintf("%d", remote.Port), fmt.Sprintf("%s@%s", remote.SSHUser, remote.Host), } - if remote.DestPrivKey != "" { - sshArgs = append(sshArgs, "bash", "-c", remoteCmd) - } else { - sshArgs = append(sshArgs, "rsync") - sshArgs = append(sshArgs, args...) - } + sshArgs = append(sshArgs, remoteCmd) cmd := exec.CommandContext(ctx, "ssh", sshArgs...)