OpenBagTwo / EnderChest

syncing and linking for all your Minecraft instances
https://openbagtwo.github.io/EnderChest/
GNU General Public License v3.0
3 stars 2 forks source link

Implement Syncing #41

Closed OpenBagTwo closed 1 year ago

OpenBagTwo commented 1 year ago

In its completed state, this PR will implement #29.

So far, I've got the low-level syncing code wired up for both rsync and file protocols, but still to do:

From the original OP A large part of that last bit is going to depend on the Windows side, which is why I'm opening the PR _now_: - if the current implementation for rsync works for Windows, I'll go down the route of seeing how difficult it is to set up an rsync daemon - if the current implementation _doesn't_ work for Windows, and it still doesn't work if [I add the `-s` flag](https://serverfault.com/a/867824) (and especially if the `file://` protocol works), then I may de-scope Windows rsync functionality from MVP and prioritize something like samba instead.

The rsync implementation does for now convert to command to the user@host:path syntax, but I left the use-daemon option in place just in case I want to bring it back.

I will note that I haven't exposed all of the rsync options to the CLI. I might eventually, but not now.

Also, the wait-five-seconds-before-doing-anything is annoying and unhelpful, but until I've dogfooded this implementation for a bit, I'm just not sure what I'm going to want the default implementation to be.

OpenBagTwo commented 1 year ago

Yeah, so I got the file:// protocol one working on Windows, but rsync is a lost cause. Especially since the standard instructions for installing rsync on Windows is: "use cygwin or WSL" (which is far from doing what the GH action is doing--downloading a portable executable).

So plan going forward:

  1. switch rsync implementation to non-daemon syntax
  2. remote rsync from the Windows runner (looks like it's still needed for macOS, but I could also just replace the action with brew install rsync)
  3. If I'm feeling fun, onboard this action instead and look into converting Windows paths to ones that use the cygdrive (note to self: Path.as_posix works fine on Windows!)