Skip to main content

Update version info file with latest changelog version entry

Project description

Changelog2version

Downloads Release Python License: MIT codecov

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


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.3.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

changelog2version-0.3.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

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

Hashes for changelog2version-0.3.0.tar.gz
Algorithm Hash digest
SHA256 819789b9f1d6820b39b007d1a3eed804caee415d1cb07a8ca59b6289ff55b8d8
MD5 4089cfec05099a6f2976c79d7ce9b377
BLAKE2b-256 ecbc646d8f0293aba11361f011c32fe24942bb4747400bfee0cdc730295b7bed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for changelog2version-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad04df1db05457fd31f0c6b106507b0976a17c67bcbf50b0fff742e32f83ee2d
MD5 a6c053e42bdd086337256fb3e499b809
BLAKE2b-256 286199d89c9527d77b0ed7924262bc7063d6893a48f3495715b9552002e470c9

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