README.md in bump-0.7.0 vs README.md in bump-0.8.0
- old
+ new
@@ -15,10 +15,16 @@
bump current
> Current version: 0.1.2
+Show next patch version:
+
+ bump show-next patch
+
+> Next patch version: 0.1.3
+
Version file path:
bump file
> Version file path: lib/foo/version.rb
@@ -37,14 +43,19 @@
bump patch --no-commit
### `--tag`
-Will add a git tag (if the current project is a git repository and `--no-commit` has not been given).
+Will add a git tag like `v1.2.3` (if the current project is a git repository and `--no-commit` has not been given).
bump patch --tag
+The `--tag-prefix` option can change the tag prefix:
+
+ 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.
bump patch --no-bundle
@@ -79,29 +90,33 @@
# Bump.replace_in_default = ["Readme.md"]
```
rake bump:current # display current version
+ rake bump:show-next INCREMENT=minor # display next minor version
rake bump:file # display version file path
# bumping using defaults for `COMMIT`, `TAG`, and `BUNDLE`
rake bump:major
rake bump:patch
rake bump:minor
rake bump:pre
# bumping with option(s)
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
require "bump"
Bump::Bump.current # -> "1.2.3"
+Bump::Bump.next_version("patch") # -> "1.2.4"
Bump::Bump.file # -> "lib/foo/version.rb"
Bump::Bump.run("patch") # -> version changed
+Bump::Bump.run("patch", tag: true, tag_prefix: 'v-') # -> version changed with tagging with '-v' as prefix
Bump::Bump.run("patch", commit: false, bundle:false, tag:false) # -> version changed with options
Bump::Bump.run("patch", commit_message: '[no ci]') # -> creates a commit message with 'v1.2.3 [no ci]' instead of default: 'v1.2.3'
```
# Supported locations