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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file changelog2version-0.2.0.tar.gz.

File metadata

  • Download URL: changelog2version-0.2.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for changelog2version-0.2.0.tar.gz
Algorithm Hash digest
SHA256 567245a249cb4b7d9ee7d91f45740286a3d6c352bb0f914ad2eb426deade6942
MD5 8fa6d932b43fd80626ded65434c1db09
BLAKE2b-256 c9d8bc07bdc37d67eecc5f7ced13c0f0b602ab282f6a4fc8f1eefbee8dde6529

See more details on using hashes here.

File details

Details for the file changelog2version-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for changelog2version-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e726f56c9e08564545fa3155d2935d2dc479147571ec6e8ab9a82725a6a54cad
MD5 d94e416250ffc23394c76eddee006b1c
BLAKE2b-256 2c51c767e7ca1a69137df02b5dfb82cb4219f87d657ad38f6c156922a6997972

See more details on using hashes here.

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