Skip to main content

Updates the release numbers for a projects

pipeline status

coverage report

This script uses the release.ini file placed at the root of the project.

release.ini

[DEFAULT]
current_release = 0.1.0  # Current version of the projects

[main_project]
path = <project>/settings/base.py
# Optional pattern, default is...
pattern = r"^__version__\s*=\s*VERSION\s*=\s*['\"][.\d\w]+['\"]$"
# Optional template, default is...
template = '__version__ = VERSION = "{major}.{minor}.{release}"\n'

[node_module]
path = <project>/assets/package.json
# Optional key, default is...
key = "version"

[sonar]
path = ./sonar-project.properties
# Optional pattern, default is...
pattern = r"^sonar.projectVersion=([.\d]+)$"
# Optional template, default is...
template = "sonar.projectVersion={major}.{minor}\n"

[docs]
path = <project>/../docs/source/conf.py
# Optional pattern, default is...
version_pattern = r"^version\s+=\s+[\"']([.\d]+)[\"']$"
# Optional template, default is...
version_format = 'version = "{major}.{minor}"\n'
# Optional pattern, default is...
release_pattern = r"^release\s+=\s+[\"']([.\d]+)[\"']$"
# Optional template, default is...
release_format = 'release = "{major}.{minor}.{release}"\n'

[ansible]
path = <project>/../ansible/prod/vars/vars.yml"
# Optional key - The script searches for the "git" root key, and then for "version" sub-key
key = "git.version"

[setup]
path = <project>/setup.py
# Optional pattern, default is...
pattern = "^\s*version=['\"]([.\d]+)['\"],$"
# Optional template, default is...
template = "    version=\"{major}.{minor}.{release}\","

Version numbers that can be updated

  • main project version
  • node package.json
  • sonar properties
  • sphinx docs
  • ansible variables in a vars file
  • setup.py

Installation

$ pip install --user bump-release

Usage

$ cd <project_root>
$ cat release.ini
[DEFAULT}
current_release = 0.0.1

[main_project]
path = "foo/__init__.py"

[sonar]
path = "sonar-project.properties"
...
$ cat foo/__init__.py
...
__version__ = VERSION = "0.0.1"
...
$ bump_release 0.0.2
...
$ cat release.ini
[DEFAULT}
current_release = 0.0.2
...
$ cat foo/__init__.py
...
__version__ = VERSION = "0.0.2"
...

Metadata

Release files for bump-release 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bump-release 0.6.1
File Size Uploaded Provenance Actions
bump_release-0.6.1.tar.gz 6.8 kB Without provenance Details for bump_release-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bump-release 0.6.1
File Interpreter ABI Platform Actions
bump_release-0.6.1-py3-none-any.whl Python 3 none any Details for bump_release-0.6.1-py3-none-any.whl

Total release size: 16.6 kB

Release files / bump_release-0.6.1.tar.gz

Download URL bump_release-0.6.1.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
96a24d608314b0b9e8430e93fa85f923ba327f5fb426d967b51ecc385e12af2e
BLAKE2b-256 checksum
How to use checksums
29c58959e8ac0ba4a7935b8066e5a8d46c0135eba24c5c885b6386ced1afc456
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

Release files / bump_release-0.6.1-py3-none-any.whl

Download URL bump_release-0.6.1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e068d9097433cb47b70fe2c6586825a938925046c2b65b29f3eb101e59c386cd
BLAKE2b-256 checksum
How to use checksums
5c0cf273596695f45fd087de8eef5c5efae911995a76b7601bb2b1479ff190d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

Security for bump-release 0.6.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page