mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-17 00:33:51 +01:00
documentation for --commit-message
This commit is contained in:
parent
0e26efd0e7
commit
3fb74f9789
2 changed files with 31 additions and 8 deletions
33
README.md
33
README.md
|
|
@ -574,7 +574,7 @@ Options:
|
||||||
|
|
||||||
--set-version <VERSION> Set version explicitly.
|
--set-version <VERSION> Set version explicitly.
|
||||||
--date <ISODATE> Set explicit date in format YYYY-0M-0D (e.g.
|
--date <ISODATE> Set explicit date in format YYYY-0M-0D (e.g.
|
||||||
2020-10-20).
|
2021-05-13).
|
||||||
|
|
||||||
--pin-date Leave date components unchanged.
|
--pin-date Leave date components unchanged.
|
||||||
--tag-num Increment release tag number (rc1, rc2,
|
--tag-num Increment release tag number (rc1, rc2,
|
||||||
|
|
@ -583,9 +583,9 @@ Options:
|
||||||
-t, --tag <NAME> Override release tag of current_version. Valid
|
-t, --tag <NAME> Override release tag of current_version. Valid
|
||||||
options are: alpha, beta, rc, post, final.
|
options are: alpha, beta, rc, post, final.
|
||||||
|
|
||||||
-p, --patch Increment patch component.
|
-p, --patch Increment PATCH component.
|
||||||
-m, --minor Increment minor component.
|
-m, --minor Increment MINOR component.
|
||||||
--major Increment major component.
|
--major Increment MAJOR component.
|
||||||
-c, --commit-message <TMPL> Set commit message template.
|
-c, --commit-message <TMPL> Set commit message template.
|
||||||
--help Show this message and exit.
|
--help Show this message and exit.
|
||||||
```
|
```
|
||||||
|
|
@ -969,7 +969,6 @@ INFO - New Version: 2019.1002-beta
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### VCS Parameters (git/mercurial)
|
### VCS Parameters (git/mercurial)
|
||||||
|
|
||||||
The individual steps performed by `bumpver update`:
|
The individual steps performed by `bumpver update`:
|
||||||
|
|
@ -1017,6 +1016,30 @@ INFO - git tag --annotate 2020.1006 --message 2020.1006
|
||||||
INFO - git push origin --follow-tags 2020.1006 HEAD
|
INFO - git push origin --follow-tags 2020.1006 HEAD
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Custom Commit Message
|
||||||
|
|
||||||
|
In addition to the `commit_message` configuration, you can also override the string used as the the commit message template with the `-c/--commit-message=<TMPL>` parameter:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ bumpver update --tag final --commit-message 'bump version {old_version} -> {new_version} [ci-publish]' --verbose
|
||||||
|
INFO - Old Version: 2021.1005b0
|
||||||
|
INFO - New Version: 2021.1006
|
||||||
|
INFO - git commit --message 'bump version 2020.1005b0 -> 2021.1006 [ci-publish]'
|
||||||
|
INFO - git tag --annotate 2020.1006 --message 2020.1006
|
||||||
|
INFO - git push origin --follow-tags 2020.1006 HEAD
|
||||||
|
```
|
||||||
|
|
||||||
|
As this is a manual operation (rather than a long lived configuration option), you can use the placeholders `OLD` and `NEW` for convenience, instead of the more verbose `{old_version}` and `{new_version}`.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ bumpver update -f -t final -c '[final-version] OLD -> NEW'
|
||||||
|
...
|
||||||
|
INFO - Old Version: 1.2.0b2
|
||||||
|
INFO - New Version: 1.2.0
|
||||||
|
INFO - git commit --message '[final-version] 1.2.0b2 -> 1.2.0'
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
| Name | role | since | until |
|
| Name | role | since | until |
|
||||||
|
|
|
||||||
|
|
@ -197,12 +197,12 @@ env_option = click.option(
|
||||||
|
|
||||||
def version_options(function: typ.Callable) -> typ.Callable:
|
def version_options(function: typ.Callable) -> typ.Callable:
|
||||||
decorators = [
|
decorators = [
|
||||||
click.option("--major", is_flag=True, default=False, help="Increment major component."),
|
click.option("--major", is_flag=True, default=False, help="Increment MAJOR component."),
|
||||||
click.option(
|
click.option(
|
||||||
"-m", "--minor", is_flag=True, default=False, help="Increment minor component."
|
"-m", "--minor", is_flag=True, default=False, help="Increment MINOR component."
|
||||||
),
|
),
|
||||||
click.option(
|
click.option(
|
||||||
"-p", "--patch", is_flag=True, default=False, help="Increment patch component."
|
"-p", "--patch", is_flag=True, default=False, help="Increment PATCH component."
|
||||||
),
|
),
|
||||||
click.option(
|
click.option(
|
||||||
"-t",
|
"-t",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue