lwhiteley / AngularLogExtender

AngularLogExtender is an AngularJS module that extends the Angular $log functionality. It uses the native $decorator to push the $log pass its capabilities and provide new functionality such as configuring the $log for different environments such as production and development
MIT License
40 stars 8 forks source link

Weird Bumping logic #29

Closed lwhiteley closed 10 years ago

lwhiteley commented 10 years ago

in the previous release,

we went 0.0.8 pre releases to version 0.0.9.

in the end there was no version 0.0.8

ferronrsmith commented 10 years ago

think that was my fault, I bumped the release number twice. After the release of v0.0.7 we didn't need to bump, but do a pre-release. I think I will fix this to be a bit more clear

lwhiteley commented 10 years ago

cool no prob

ferronrsmith commented 10 years ago

Turns out grunt-bump has a darn bug with pre-release. I am going to fork https://github.com/ferronrsmith/grunt-contrib-bump and add the missing features.

ferronrsmith commented 10 years ago

We are going to move to semantic versioning from now on, the specification can be found here : http://semver.org/

And the implementation is as follows:

grunt bump:major # bump major version, eg. 1.0.2 -> 2.0.0 grunt bump:minor # bump minor version, eg. 0.1.3 -> 0.2.0 grunt bump:patch # bump minor version, eg. 0.0.1 -> 0.0.2

If the current version is already a prerelease version, this will work.

grunt bump:prerelease # bump prerelease version, eg. 0.0.1-9 -> 0.0.1-10

But if it isn't you'll run into an improperly bumped version.

grunt bump:prerelease # bump prerelease version, eg. 1.0.2 -> 1.0.2-0 grunt bump:prerelease # bump prerelease version, eg. 0.1.3 -> 0.1.3-0 grunt bump:prerelease # bump prerelease version, eg. 0.0.1 -> 0.0.1-0

Because prerelease has no idea if you're going from 0.0.1 to 0.0.2-0

or 0.1.0-0 or 1.0.0-0, you need to use it in conjunction with one of

the other three semver increment modes. You can specify any number of

:-separated modes.

grunt bump:major:prerelease # eg. 1.0.2 -> 2.0.0-0 grunt bump:minor:prerelease # eg. 0.1.3 -> 0.2.0-0 grunt bump:patch:prerelease # eg. 0.0.1 -> 0.0.2-0

You can also use abbreviations, as long as they aren't ambiguous

grunt bump:ma:pr # still works, eg. 1.0.2 -> 2.0.0-0 grunt bump:mi:pr # still works, eg. 0.1.3 -> 0.2.0-0 grunt bump:pa:pr # still works, eg. 0.0.1 -> 0.0.2-0

Support is also available for bump:git

Git releases are developer snapshots and should not be used in production.

grunt bump:git # still works, eg. 0.1.0 -> 0.1.0+sha.c8ba77d grunt bump:pr:git # still works, eg. 0.1.0-0 -> 0.1.0-0+sha.c8ba77d

NB: Note in our case we are doing patch releases when we do a distribution.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 88f59399c17ffbacf2f28f5b9c2cd95cb0a4ff7e on feature/bump into 6871eeaec272a2c94900da06c6165eb67e1b39a9 on develop.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 88f59399c17ffbacf2f28f5b9c2cd95cb0a4ff7e on feature/bump into 6871eeaec272a2c94900da06c6165eb67e1b39a9 on develop.