mbarkhau / bumpver

BumpVer: Automatic Versioning
https://github.com/mbarkhau/bumpver
MIT License
199 stars 36 forks source link

No documentation on using version in README.md #187

Closed dougscc closed 2 years ago

dougscc commented 2 years ago

When attempting to run bumpver with bumpver update --patch --dry --no-fetch I get a complaint about no version in README.md

INFO    - Old Version: 2022.1001-beta
INFO    - New Version: 2022.1002-beta
ERROR   - No match for pattern 'YYYY.BLD[PYTAGNUM]'
ERROR   -
# https://regex101.com/?flavor=python&flags=gmx&regex=%28%3FP%3Cyear_y%3E%5B1-9%5D%5B0-9%5D%7B3%7D%29%0A%5C.%0A%28%3FP%3Cbid%3E%5B1-9%5D%5B0-9%5D%2A%29%0A%28%3F%3A%0A%20%20%20%20%28%3FP%3Cpytag%3Epost%7Crc%7Ca%7Cb%29%0A%20%20%20%20%28%3FP%3Cnum%3E%5B0-9%5D%2B%29%0A%29%3F
regex = re.compile(r"""
    (?P<year_y>[1-9][0-9]{3})
    \.
    (?P<bid>[1-9][0-9]*)
    (?:
        (?P<pytag>post|rc|a|b)
        (?P<num>[0-9]+)
    )?
""", flags=re.VERBOSE)
ERROR   - No patterns matched for file 'README.md'

I have added 2022.1001-beta directly under the title, but this does not make any difference:

 bumpver grep 'YYYY.BUILD[PYTAGNUM]' README.md
   1: # finance-refresh-powerbi
   2: 2022.1001-beta

Note: in the output only 2022.1001 is bold. The -beta string is not bold.

I've looked at this project's README.md and have not been able to find a version number specified outside of image schemes and wonder where I might find an example that will satisfy?

mbarkhau commented 2 years ago

I'm not sure I understand your question completely, but I can just point to what I think is going on in your example. From the Part Overview in the README.md:

part range / example(s) info
TAG alpha, beta, rc, post --tag=<tag>
PYTAG a, b, rc, post --tag=<tag>

Notice that TAG matches the long form syntax (such as beta in your example) whereas PYTAG will only match the short syntax such as b (as defined by PEP440).

How do you think the documentation can be improved so you would have seen this?