chucknorris/roundhouse — pull request #138 by alexandermlharris (2014-01-31 19:55:22+00:00)
Title: Pass version via command line argument

`NB: This is the same changelist as Pull Request #135, I've just resubmitted it via it's own feature branch (originally submitted to master - I'm new to git).`

Issue #120 asks for the ability to pass the version via the command line. I had the same requirement (for use in a TeamCity CI environment) to save having to write the managed build number to a file as a separate step.

I've implemented it this PR as follows:

* Add a new Property `Value` to the configuration objects.
* Add new command line argument and description, mapped to this property.
* `-v|-version`, Optional, but overrides version file switches when set.
* Add a new `CommandLineVersionResolver` which is constructed with this property and checks if it's null / empty.
* Updated the logic in the `VersionResolverBuilder` skip the use of the file based resolvers if the command line resolver is valid.

I've built the project via the build.bat file and tested the produced rh.exe and it works as expected:

* `-v|-version` not **set** - *existing behaviour*
* `-v|-version` **set** - *uses version from `-v`*
* `-v|-version` **set**, `-vf|-versionfile` **set** - *uses version from `-v`, doesn't run file checks.*

Please take a look and let me know if you've any questions or comments. I've tried to match the style of the project, but in particular my description may not be to your liking. This is my first time properly running through the github pull process etc. so if I've omitted any steps, or failed to include any required files or changes, my apologies.

Cheers,

Alexander