poetry gitversion
This plugin is created to integrate gitversion with poetry. It allows you to automatically set the version of your project based on your git history.
Installation
If the plugin is released on pypi, you can install it with the following command:
$ poetry self add poetry-plugin-gitversion
But at the moment it's just released on my private pypi server, so you have to add the repository first.
This is not that easy, because poetry self add does not support --repository yet,
so you have to add the repository to your poetry config first.
Find the config location with: poetry config --list --local and use the data-dir directory.
This directory will contain a pyproject.toml file, where you need to add the repository:
[[tool.poetry.source]]
name = "bls19"
url = "https://pypi.bls19.de/simple"
priority = "supplemental"
After you did this, you can install the plugin with the command from above.
Configuration
For versions working with poetry/python, it's recommended to configure gitversion.
You can do this by creating a GitVersion.yml file in the root of your project.
# information about configuration of GitVersion:
# https://gitversion.net/docs/reference/configuration
branches:
release:
mode: ContinuousDelivery
prevent-increment:
when-current-commit-tagged: true
label: beta
is-release-branch: true
increment: Patch
This configuration will get the tagged version if the current commit is tagged,
otherwise it will increment the patch version and add a beta label, followed by CommitsSinceVersionSource.
That means the following order is maybe released:
- 0.1.0
- 0.1.1-beta.1
- 0.1.1-beta.2
- 0.1.1-beta.4
- 0.1.1
- 0.1.2-beta.1
- 0.1.2-beta.2
- ...
Debug/use this plugin inside this project
With this command you apply the plugin to this project and you can test it.
But it works only if the project is cloned into the directory poetry_plugin_gitversion.git,
if not the plugin will not be activated.
$ poetry env activate
PoetryGitVersion: Poetry GitVersion-Plugin aktiviert
GitVersion: Version auf 0.1.4-beta.2 gesetzt
source /Users/my_user/development/github/poetry_plugin_gitversion.git/.venv/bin/activate
Now the version will be returned by poetry version and poetry build will use this version.
Release history
0.1.4
- publish to pypi.org
- renamed to
poetry-plugin-gitversionto follow the naming convention of poetry plugins
0.1.3
- add documentation about the installation of this plugin
0.1.2
- initial release of the plugin that works
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file poetry_plugin_gitversion-0.1.4.tar.gz.
File metadata
- Download URL: poetry_plugin_gitversion-0.1.4.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.4.1 CPython/3.14.7 Darwin/25.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c81b11fa575faa9df99f3f5d0da2abdace7fee5c06ce5576cea2b43045f240ec
|
|
| MD5 |
4b5ba47b88a85f77fc3dc4fbcc43e7de
|
|
| BLAKE2b-256 |
0e05fdb0f75d01008bca01bd18a698f000c811aed54ab6b714881fa7666ed136
|
File details
Details for the file poetry_plugin_gitversion-0.1.4-py3-none-any.whl.
File metadata
- Download URL: poetry_plugin_gitversion-0.1.4-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.4.1 CPython/3.14.7 Darwin/25.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
407c4f839f7da3970dbc06fb68c9bba470b5cdd2bee41db537bdef8a5ea8406c
|
|
| MD5 |
c919cf634d0b1b2185352dc99a52a1be
|
|
| BLAKE2b-256 |
98a90d1625b77d55da71225952cdd08e3855bb9c6d291e8013eca6d512ab7797
|