sup icon indicating copy to clipboard operation
sup copied to clipboard

Refactor local tar to using archive/tar pkg

Open pkieltyka opened this issue 8 years ago • 11 comments

See: https://github.com/pressly/sup/blob/master/tar.go#L36

pkieltyka avatar Dec 01 '15 13:12 pkieltyka

:+1:

eduardonunesp avatar Dec 01 '15 14:12 eduardonunesp

@eduardonunesp feel free to submit a PR for this if you have the time :)

pkieltyka avatar Dec 01 '15 14:12 pkieltyka

Sure, I'll take a look, need to learn more about archive/tar

eduardonunesp avatar Dec 01 '15 14:12 eduardonunesp

I don't know if "tar/archive" will help us lot --- the same problem is on the end machine too, not just on localhost.

VojtechVitek avatar Dec 01 '15 15:12 VojtechVitek

archive/tar can help if the localhost doesn't have the tar command right ? the Sup is using the minimum viable tar options now

eduardonunesp avatar Dec 01 '15 22:12 eduardonunesp

thats true. Having archive/tar at least helps the local machine, ie. what if someone uses this on Windows?

also, do we really need tar at all to transfer the data..? doesn't the library have some kind of scp equivalent to send a stream of file data?

pkieltyka avatar Dec 02 '15 17:12 pkieltyka

A friend of mine, suggested to use rsync instead of tar. But i don't have idea how to replace :(

eduardonunesp avatar Dec 02 '15 17:12 eduardonunesp

I'd love to use rsync, if available. But not all machines have that. We can maybe fall-back to tar, if necessary.

VojtechVitek avatar Dec 02 '15 17:12 VojtechVitek

Agree, the local archive/tar looks good, in the case of Windows.

In the case of rsync in go, I found that, or want to use the command rsync instead ? In both cases I don't have idea how to implement

eduardonunesp avatar Dec 02 '15 18:12 eduardonunesp

I wish we could use just go libs for the upload instead of having to go down to cli calls to get a data stream for a bunch of files.

rsync is cool though since it does a file sync without a full upload

pkieltyka avatar Dec 02 '15 19:12 pkieltyka

Yes, I'll do that for localhost. I can't do that for remote command though.

VojtechVitek avatar Dec 02 '15 19:12 VojtechVitek