nathanmarz/storm-deploy — pull request #45 by lorcan (2013-10-03 16:51:17+00:00)
Title: Allows storm-deploy more flexibility - checkout branches and SHA1s

The storm `--release` model is very unclear and not all that useful. Currently there is a choice of passing a no release, in which case you get a version of storm based on the latest commit from master or you get to pass a release which gets you the latest commit from that branch, e.g.,

lein deploy-storm --start --name mycluster --release 0.9.0

gets you storm 0.9.0wip16 (roughly, actually it gets you commit (d12c33543c9b2e8c8e35908f8672fa06edd18c2e, which is between 0.9.0-wip16 and 0.9.0-wip17)

and

lein deploy-storm --start --name mycluster

gets you the latest commit from master. It's not possible to get anything inbetween.

This commit drops the `--release` argument in favour of a `--branch` argument (equivalent to `--release`) and a `--commit` argument, which takes a SHA1. If a commit is passed then we attempt to checkout that SHA1 into a new branch and use that. This gives us much more flexibility, e.g., to checkout storm 0.9.0-rc2 you would run

lein deploy-storm --start --name mycluster --branch master --commit 32098d5b2694434ea43d430a4703fbe51bab268f

If you want the latest version from a specific branch (say 0.8.3) you can execute

lein deploy-storm --start --name mycluster --branch 0.8.3

and if you want the bleeding edge you can still execute this get the latest commit from master

lein deploy-storm --start --name mycluster

The diff on this commit is bigger than it might have been because i deliberately changed `release` to `branch` wherever possible. I think now that storm has both releases (since 0.9.9-rc1) and branches we should make the code closer to what's actually happening (i.e., checking out branches rather than releases).

I'd love to get feedback on this. I've played around with it today but I wouldn't go so far to say it's perfect. I'd like to see if anyone else has had success with it before pulling it into nathanmarz/storm-deploy proper.

This includes @xpe's pull request nathanmarz/storm-deploy#40 and @lorcan's pull requests nathanmarz/storm-deploy#43 and nathanmarz/storm-deploy#44