Skip to main content

PyBuilder Git Version Plugin

Summary

This project is a plugin for PyBuilder that sets the project version based on git tags.

Usage

To use the plugin put the following in the plugins section of build.py:

use_plugin('pybuilder_git_version')

The possible properties for use are:

Property Value Default Usage
use_git_version True / False True Turns off pybuilder_git_version
git_version_commit_distance_as_build_number True / False True Uses commit count from tag as build number

Examples

The following table has examples of repo state and corresponding version number produced.

Tag Branch Clean / Dirty Number of commits since tag Version
0.0.1 master clean 0 0.0.1
0.0.1 master dirty 0 0.0.2+build.0
0.2.2 develop clean 5 0.2.3+develop.5
1.2.3 develop dirty 3 1.2.4+develop.3
1.0.0-rc.1 feature/TICKET-100 clean 5 1.0.0-rc.1+ticket100.5
0.0.1 hotfix/BUG-20 clean 0 0.0.2+bug20.0

Metadata

Release files for pybuilder-git-version 0.6.0

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

Source distribution (sdist)

Source distribution for pybuilder-git-version 0.6.0
File Size Uploaded
pybuilder-git-version-0.6.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybuilder-git-version 0.6.0
File Interpreter ABI Platform
pybuilder_git_version-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / pybuilder-git-version-0.6.0.tar.gz

Download URL pybuilder-git-version-0.6.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
44d0600f9750324a9082798d80a5b1eda0d8e285ea135600339934fee87f8f3a
BLAKE2b-256 checksum
How to use checksums
02ae935e8c7fa87dcb84198488e1845e6b6f1746f60a836cb19f84448e1b6f96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.13

Release files / pybuilder_git_version-0.6.0-py3-none-any.whl

Download URL pybuilder_git_version-0.6.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b33d2bd30d92c1ce347c1676fc1ecc526d7ff67e9fa40e520f8c95f3df98d216
BLAKE2b-256 checksum
How to use checksums
5f73bf9080d5d3ecbbb6cf20033eb7b118b464b817599c9e5a402be7b62deee7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.8.13

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

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