README.md in bump-0.8.0 vs README.md in bump-0.9.0

- old
+ new

@@ -1,47 +1,49 @@ [![Build Status](https://travis-ci.org/gregorym/bump.svg)](https://travis-ci.org/gregorym/bump) [![Gem Version](https://badge.fury.io/rb/bump.svg)](http://badge.fury.io/rb/bump) -# Introduction +A gem to bump versions of gems and chef-cookbooks. -Bump is a gem that will simplify the way you build gems and chef-cookbooks. + - bumps version major / minor / patch / pre + - bundles + - commits changes # Installation gem install bump # Usage -Current version: +### Show current version bump current > Current version: 0.1.2 -Show next patch version: +### Bump (major, minor, patch, pre) + bump patch + +> Bump version 0.1.2 to 0.1.3 + +### Show next version + bump show-next patch > Next patch version: 0.1.3 -Version file path: +### Show version file path bump file > Version file path: lib/foo/version.rb -Bump (major, minor, patch, pre): - - bump patch - -> Bump version 0.1.2 to 0.1.3 - ## Options ### `--no-commit` -If you don't want to make a commit after bumping, add the `--no-commit` option. +Do not commit after bumping. bump patch --no-commit ### `--tag` @@ -54,43 +56,58 @@ bump patch --tag --tag-prefix v- # tag as v-1.2.3 bump patch --tag --tag-prefix "" # tag as 1.2.3 ### `--no-bundle` -If you don't want to run the `bundle` command after bumping, add the `--no-bundle` option. +Do not run `bundle` command after bumping. bump patch --no-bundle ### `--replace-in` -If you want to bump the version in additional files +Bump the version in additional files. bump patch --reaplace-in Readme.md ### `--commit-message [MSG], -m [MSG]` -If you want to append additional information to the commit message, pass it in using the `--commit-message [MSG]` or `-m [MSG]` option. +Append additional information to the commit message. - bump patch --commit-message [no-ci] + bump patch --commit-message "Something extra" or - bump patch -m [no-cli] + bump patch -m "Something extra" -### Rake +### `--changelog` +Update `CHANGELOG.md` when bumping. +This requires a heading (starting with `##`) that includes the previous version and a heading above that, for example: + +```markdown +### Next +- Added bar + +### v0.0.0 - 2019-12-24 +- Added foo +``` + +## Rake + ```ruby # Rakefile require "bump/tasks" # -# if you want to always tag the version, add: -# Bump.tag_by_default = true +# do not always tag the version +# Bump.tag_by_default = false # -# if you want to bump the version in additional files, add: +# bump the version in additional files # Bump.replace_in_default = ["Readme.md"] - +# +# Maintain changelog: +# Bump.changelog = true ``` rake bump:current # display current version rake bump:show-next INCREMENT=minor # display next minor version rake bump:file # display version file path @@ -105,10 +122,10 @@ rake bump:patch TAG=false BUNDLE=false # commit, but don't tag or run `bundle` rake bump:patch TAG=true TAG_PREFIX=v- # tag with a prefix 'v-' ex. the tag will look like v-0.0.1 rake bump:patch COMMIT=false TAG=false # don't commit, don't tag rake bump:minor BUNDLE=false # don't run `bundle` -### Ruby +## Ruby ```ruby require "bump" Bump::Bump.current # -> "1.2.3" Bump::Bump.next_version("patch") # -> "1.2.4"