tvaughan/middleman-deploy — pull request #8 by benben (2012-11-28 10:34:47+00:00)
Title: git deploy refactor

hello tom,

:sparkles: I fixed the whole git deploy process to make it more robust and flexbile. :sparkles:

What the new version can do further than the current one:

* remove deleted files on remote
* handle updates on remote which aren't already pulled
* handle config.rb changes
* handle empty commits (if I want to deploy to trigger github pages build but didn't changed anything on the site)
* handle possible errors (it pushes with force :facepunch: )
* a user can specify a remote name *or* a git url in config.rb, middleman-deploy will handle it
* handle if the remote branch we want to deploy doesn' exist and create it

What I changed:

* removed the dependency to the git gem since it is very old, unmaintained and we can't use more sophisticated git commands with it
* use shelled out plain git commands
* removed the git backport to the local repo, since the repo we can push to could be something else
* put the git repo for deploying in the build folder, no need to add a tmp repo everytime we deploy (and its easier/faster to keep track of the remote repo)
* updated the README with my crazy german-english grammar (maybe you can have a special look on this part :smiley_cat: )

cheers,

ben :sparkling_heart: