Automatic deployment from BitBucket

I’ve just stumbled upon this BitBucket sync script which works great! It can download the (master) branch as a ZIP archive and unzip it to deployment folder. But aside from that, combined with a BitBucket’s POST hook, it can pick-up latest commits and update file-by-file directly from repository, so you can keep your live website up-to-date automatically!

Using POST hook BitBucket will notify the script about any commits pushed to the repo, and script can process each of them and update modified (or added/removed) files one-by-one easily.

Since this is a ready-to-use script which doesn’t suit my needs perfectly, I have just forked it as a private repository (and will most likely make it public later, as I progress) in an attempt to rewrite it as a PHP class (or set of classes) to be used in other applications.