Update version info file with latest changelog version entry
Project description
Changelog2version
Update version info file with latest changelog version entry
General
Create version info files based on the latest changelog entry.
Installation
pip install changelog2version
Usage
This example shows you how to parse the repo's changelog and update the package version file with that version.
changelog2version \
--changelog_file changelog.md \
--version_file src/changelog2version/version.py \
--debug
Advanced
Custom regular expressions
To extract a version line from a given changelog file with an alternative
regex, the version_line_regex
argument can be used as shown below. The
expression is validated during the CLI argument parsing
changelog2version \
--changelog_file changelog.md \
--version_file src/changelog2version/version.py \
--version_line_regex "^\#\# \[\d{1,}[.]\d{1,}[.]\d{1,}\]" \
--debug
Same applies for a custom semver line regex in order to extract the semantic
version part from a full version line, use the semver_line_regex
argument to
adjust the regular expression to your needs.
Credits
Based on the PyPa sample project. Also a big thank you to the creators and maintainers of SemVer.org for their documentation and regex example
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file changelog2version-0.3.0.tar.gz
.
File metadata
- Download URL: changelog2version-0.3.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 819789b9f1d6820b39b007d1a3eed804caee415d1cb07a8ca59b6289ff55b8d8 |
|
MD5 | 4089cfec05099a6f2976c79d7ce9b377 |
|
BLAKE2b-256 | ecbc646d8f0293aba11361f011c32fe24942bb4747400bfee0cdc730295b7bed |
File details
Details for the file changelog2version-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: changelog2version-0.3.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad04df1db05457fd31f0c6b106507b0976a17c67bcbf50b0fff742e32f83ee2d |
|
MD5 | a6c053e42bdd086337256fb3e499b809 |
|
BLAKE2b-256 | 286199d89c9527d77b0ed7924262bc7063d6893a48f3495715b9552002e470c9 |