Skip to main content

Update version info file with latest changelog version entry

Project description

Changelog2version

Downloads Release Python License: MIT

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

changelog2version-0.2.0.tar.gz (10.1 kB view hashes)

Uploaded Source

Built Distribution

changelog2version-0.2.0-py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page