mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
update documentation
This commit is contained in:
parent
98e97fa38a
commit
cccd7052b8
2 changed files with 15 additions and 2 deletions
15
README.md
15
README.md
|
|
@ -147,7 +147,7 @@ src/mymodule_v*/__init__.py =
|
||||||
__version__ = "{pycalver}"
|
__version__ = "{pycalver}"
|
||||||
README.md =
|
README.md =
|
||||||
[PyCalVer {calver}{build}{release}]
|
[PyCalVer {calver}{build}{release}]
|
||||||
img.shields.io/badge/PyCalVer-{calver}{build}-{release}-blue
|
img.shields.io/static/v1.svg?label=PyCalVer&message={pycalver}&color=blue
|
||||||
```
|
```
|
||||||
|
|
||||||
To see if a pattern is found, you can use `pycalver bump --dry`, which will
|
To see if a pattern is found, you can use `pycalver bump --dry`, which will
|
||||||
|
|
@ -188,6 +188,19 @@ INFO - New Version: v201902.0002-beta
|
||||||
license="MIT",
|
license="MIT",
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If there is no match for a pattern, bump will report an error.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ pycalver bump --dry --no-fetch
|
||||||
|
INFO - Old Version: v201901.0001-beta
|
||||||
|
INFO - New Version: v201902.0002-beta
|
||||||
|
ERROR - No match for pattern 'img.shields.io/static/v1.svg?label=PyCalVer&message={pycalver}&color=blue'
|
||||||
|
ERROR - Pattern compiles to regex 'img\.shields\.io/static/v1\.svg\?label=PyCalVer&message=(?P<pycalver>v(?P<year>\d{4})(?P<month>(?:0[0-9]|1[0-2]))\.(?P<bid>\d{4,})(?:-(?P
|
||||||
|
<tag>(?:alpha|beta|dev|rc|post|final)))?)&color=blue'
|
||||||
|
```
|
||||||
|
|
||||||
|
The internally used regular expression is also shown, which you can use to debug the issue, for example on https://regex101.com.
|
||||||
|
|
||||||
|
|
||||||
### Pattern Search and Replacement
|
### Pattern Search and Replacement
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ def rewrite_lines(
|
||||||
log.error(f"No match for pattern '{non_matched_pattern}'")
|
log.error(f"No match for pattern '{non_matched_pattern}'")
|
||||||
compiled_pattern = patterns._compile_pattern(non_matched_pattern)
|
compiled_pattern = patterns._compile_pattern(non_matched_pattern)
|
||||||
log.error(f"Pattern compiles to regex '{compiled_pattern}'")
|
log.error(f"Pattern compiles to regex '{compiled_pattern}'")
|
||||||
raise ValueError("Invalid pattern(s)", list(non_matched_patterns))
|
raise ValueError("Invalid pattern(s)")
|
||||||
else:
|
else:
|
||||||
return new_lines
|
return new_lines
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue