welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 165 forks source link

How wordmove uploads only modified files ( force deploy all files )? #406

Closed cfabrice closed 7 years ago

cfabrice commented 7 years ago

I'm wondering wordmove identifies modified files... Apparently it is not git based ! Is it the date ? I'm asking because we are a (very) small team working often together on the same project (mainly wordpress themes). As each of us use git on the same repo, we normally use "php git deploy" to push our modifications on production and wordmove for the database. But we'd be happy to deploy also the files with wordmove ! I check the video on pushing theme (push -t) and I could see that only the modified files are deployed so it might work as after doing a git pull we'd have some modified files... But I'm wondering if there is a way to force deploy the whole themes directory and not just the modified files in it (but the not the --all option that will upload the files, the DB... Thank you.

alessandro-fazzi commented 7 years ago

Hi @cfabrice ,

Wordmove uses another gem to handle file transfers: Photocopier.

Photocopier, when using SSH connections, relies on the good old rsync. -rltpd and --delete flags are passed to rsync by default, and you can pass any other rsync option you may need through the Movefile (docs in the wiki).

That said, I cannot get the scenario where doing such an rsync would be different from completely re-deploy the whole directory, if not for consuming more bandwidth :P

Jokes aside, there is an option

-I, --ignore-times
              Normally  rsync  will  skip  any files that are already the same size and have the same modification timestamp.  This option turns off this "quick
              check" behavior, causing all files to be updated.

which could fit your request, even if I can't get the point :)

cfabrice commented 7 years ago

You're probably right... But thank you ;-)