mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2026-02-02 15:45:11 +01:00
Add command line parameters for VCS configuration
- Add the following flags to the 'bumpver update' command:
* --commit / --no-commit
* --tag-commit / --no-tag-commit
* --push / --no-push
- Add test cases for these flags including checks for incorrect usage
- Document new flags in README
This commit is contained in:
parent
c8138d89ef
commit
b4cf3a5f32
3 changed files with 273 additions and 29 deletions
58
README.md
58
README.md
|
|
@ -564,30 +564,29 @@ Usage: bumpver update [OPTIONS]
|
|||
Update project files with the incremented version string.
|
||||
|
||||
Options:
|
||||
-d, --dry Display diff of changes, don't rewrite files.
|
||||
-f, --fetch / -n, --no-fetch Sync tags from remote origin.
|
||||
-v, --verbose Control log level. -vv for debug level.
|
||||
--allow-dirty Commit even when working directory is has
|
||||
uncomitted changes. (WARNING: The commit will
|
||||
still be aborted if there are uncomitted to
|
||||
files with version strings.
|
||||
|
||||
--set-version <VERSION> Set version explicitly.
|
||||
--date <ISODATE> Set explicit date in format YYYY-0M-0D (e.g.
|
||||
2021-05-13).
|
||||
|
||||
--pin-date Leave date components unchanged.
|
||||
--tag-num Increment release tag number (rc1, rc2,
|
||||
rc3..).
|
||||
|
||||
-t, --tag <NAME> Override release tag of current_version. Valid
|
||||
options are: alpha, beta, rc, post, final.
|
||||
|
||||
-p, --patch Increment PATCH component.
|
||||
-m, --minor Increment MINOR component.
|
||||
--major Increment MAJOR component.
|
||||
-c, --commit-message <TMPL> Set commit message template.
|
||||
--help Show this message and exit.
|
||||
-d, --dry Display diff of changes, don't rewrite files.
|
||||
-f, --fetch / -n, --no-fetch Sync tags from remote origin.
|
||||
-v, --verbose Control log level. -vv for debug level.
|
||||
--allow-dirty Commit even when working directory is has
|
||||
uncomitted changes. (WARNING: The commit will
|
||||
still be aborted if there are uncomitted to
|
||||
files with version strings.
|
||||
--set-version <VERSION> Set version explicitly.
|
||||
--date <ISODATE> Set explicit date in format YYYY-0M-0D (e.g.
|
||||
2021-05-13).
|
||||
--pin-date Leave date components unchanged.
|
||||
--tag-num Increment release tag number (rc1, rc2,
|
||||
rc3..).
|
||||
-t, --tag <NAME> Override release tag of current_version. Valid
|
||||
options are: alpha, beta, rc, post, final.
|
||||
-p, --patch Increment PATCH component.
|
||||
-m, --minor Increment MINOR component.
|
||||
--major Increment MAJOR component.
|
||||
-c, --commit-message <TMPL> Set commit message template.
|
||||
--commit / --no-commit Create a commit with all updated files.
|
||||
--tag-commit / --no-tag-commit Tag the newly created commit.
|
||||
--push / --no-push Push to the default remote.
|
||||
--help Show this message and exit.
|
||||
```
|
||||
|
||||
<!-- END bumpver update --help -->
|
||||
|
|
@ -1016,6 +1015,17 @@ INFO - git tag --annotate 2020.1006 --message 2020.1006
|
|||
INFO - git push origin --follow-tags 2020.1006 HEAD
|
||||
```
|
||||
|
||||
It's also possible to override the config values by passing the following command line flags to `bumpver update`:
|
||||
|
||||
| Flag | Override config |
|
||||
|-------------------|-------------------------------------------------|
|
||||
| `--commit` | `commit = True` |
|
||||
| `--no-commit` | `commit = False`, `tag = False`, `push = False` |
|
||||
| `--tag-commit` | `tag = True` |
|
||||
| `--no-tag-commit` | `tag = False` |
|
||||
| `--push` | `push = True` |
|
||||
| `--no-push` | `push = False` |
|
||||
|
||||
### 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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue