0

I'm using Phing as my build tool for a website i'm developing. I have a server running on localhost to test things on my own system, and i have a test environment on the server it's eventually going to run on. Deploying to that test environment is currently done by tarring all the built files, uploading the tar to the server and extracting it there.

However, since i'm also using quite a bit of images, this takes pretty damn long; 10 seconds for local deploy vs 4 minutes for a remote deploy. Is there any way to either compare files in 2 directories and only tar the ones that are newer in one dir (so i can keep a shadow copy of the build dir to compare file dates) or another best practice?

Something else i've been thinking about trying is uploading the site using git. Any ideas on that?

Erik S
  • 1,939
  • 1
  • 18
  • 44
  • Why don't you do a rsync instead a tarball?? – m4t1t0 Dec 31 '12 at 10:44
  • @m4t1t0 phing is a build tool not that supports a lot of other things that rsync does not provide. – Shiplu Mokaddim Dec 31 '12 at 11:07
  • Rsync is a possibility, though i was under the impression that it needed to be installed both locally and remotely. I'd very much prefer not to install it on the remote machine. – Erik S Dec 31 '12 at 11:10
  • Does [`FileSyncTask`](http://articles.fedecarg.com/wiki/FileSyncTask) work for you? – Shiplu Mokaddim Dec 31 '12 at 11:13
  • Hmm, going to try that one. – Erik S Dec 31 '12 at 11:15
  • `FileSyncTask` uses rsync under the hood, and it appears that it actually errors because it's not installed remotely (error 127)... http://www.averyjparker.com/2010/11/22/rsnapshot-error-usrbinrsync-returned-127-while-processing/ So, `FileSyncTask` is out of the question. – Erik S Dec 31 '12 at 11:43

1 Answers1

1

yesterday I had the same problem, this answer resolved my problem

Phing - Deploy with FTP but only overwrite when size has changed

Community
  • 1
  • 1
  • One problem: I explicitly don't want to use FTP or SCP to copy all files seperately, since that takes longer (tons of really small files). – Erik S Jan 05 '13 at 18:23
  • 2
    Well, I'm not using FTP too in my solution, but have used the idea of generating a build date and time and save it in a file. Then I copy into a deploy dir only the files modfied after last build date and time. – Ademir Mazer Jr - Nuno Jan 07 '13 at 19:51
  • It took some time, but i managed to get the same idea working :) – Erik S Jan 11 '13 at 14:13
  • Good to know, I spent some hours too till get it working in my needs, but after that just reuse in some others situations. – Ademir Mazer Jr - Nuno Jan 14 '13 at 15:34