Skip to main content

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.

gitversion will be used to extract the version from your git history. This plugin just take the output and set the version of your poetry project during version, publish, ... .

Installation

gitversion needs to be installed first, before you can use this plugin. You can find the installation instructions on the GitVersion website. Execute gitversion in the root directory of your GitRepository inside your terminal to check if it is installed correctly.

You can install the plugin itself from pypi, using the following command:

$ poetry self add poetry-plugin-gitversion

Configuration

To change the versioning strategy, you need to configure the gitversion application. You can create a GitVersion.yml file in the root of your project. For versions working with poetry/python, it's recommended to configure gitversion.

The release branches can be configured in the GitVersion.yml file, for example like this:

# 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
  • ...

The publishing will make pypi compatible versions out of this. Something like: 0.1.1b2 for 0.1.1-beta.2.

Release history

0.1.6

  • optimized the README.md file to be more clear and understandable

0.1.5

  • fix imports for IO and Poetry at plugin (add cleo dependency)
  • fix io.wirte_line text format, without : behind plugin name

0.1.4

  • publish to pypi.org
  • renamed to poetry-plugin-gitversion to 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

poetry_plugin_gitversion-0.1.6.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poetry_plugin_gitversion-0.1.6-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file poetry_plugin_gitversion-0.1.6.tar.gz.

File metadata

  • Download URL: poetry_plugin_gitversion-0.1.6.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/25.6.0

File hashes

Hashes for poetry_plugin_gitversion-0.1.6.tar.gz
Algorithm Hash digest
SHA256 7a2436c641edd9c61ff99cceb68102f98689def8beb5ea5287b81549980fd3e8
MD5 b747115525edf28c51ee5b7300d52e08
BLAKE2b-256 2c518b4ab4f850cbecbcb87ec585e889256d523e3e777ff0aced0d1eef6db4f3

See more details on using hashes here.

File details

Details for the file poetry_plugin_gitversion-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for poetry_plugin_gitversion-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 057de09007c12265997ef11079f023cf0b9bafc2108cecae3fc762ebc5b6436f
MD5 cafacd8a2f7e5aa755a0f445990c3612
BLAKE2b-256 95e09bfe0851b81f50459ecf8b1ac544d147aa863cc9224d1c3f2cd1adce3d7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page