ploeh / ZeroToNine

A tool for maintaining .NET Assembly versions across multiple files.
MIT License
147 stars 16 forks source link

Assign operation based on existing Version number #19

Closed russcam closed 10 years ago

russcam commented 10 years ago

It would be useful to be able to assign Version part values independently and retain existing Version part values. For example, Given an Assembly with a current version

1.0.0.20

Running the command

Zero29 -a e.e.e.30

Would result in an Assembly version of

1.0.0.30

My example here uses 'e' as a placeholder for the existing version part value, but this could be any reasonable placeholder.

Alternatively, Given an Assembly with a current version

1.0.0.20

Running the command

Zero29 -a minor 5

Would result in an Assembly version of

1.5.0.20

My personal main driver for doing this is to be able to have more explicit control over the individual parts of a version. This enables scenarios whereby a development team may control certain version parts and allow a CI server to control other parts.

ploeh commented 10 years ago

Sounds reasonable. I like both suggested syntaxes, although I'd like to suggest

Zero29 -a *.*.*.30

instead of using e as a placeholder.

russcam commented 10 years ago

Great! I've implemented the second suggestion already, including tests. I'll submit a pull request now

russcam commented 10 years ago

Pull request submitted.