Skip to main content

Poetry plugin to get package version from git

Project description

Poetry Git Version Plugin

Poetry plugin to get package version from git.

Functionality

  • Project tag parsing
  • Substitution of the project tag (if any) in the poetry.version value
  • Maintenance of PEP 440
  • Command to output a new version

Quick start

poetry self add poetry-git-version-plugin
poetry git-version # Write your git tag
poetry -v git-version # print process

Dependencies

[tool.poetry.dependencies]
python = ">=3.7"
poetry = ">=1.2.0"

Setup

[tool.poetry-git-version-plugin]
# Ignore "tag missing" errors
ignore_errors = true

# If the tag is missing.
# Returns a version, computed from the latest version tag.
# It takes the version tag, increases the version tag by the number of commits since, adds a local label specifying the git commit hash and the dirty status.
# Example: 1.3.2+5-5babef6
make_alpha_version = true

Contribute

Issue Tracker: https://gitlab.com/rocshers/python/poetry-git-version-plugin/-/issues
Source Code: https://gitlab.com/rocshers/python/poetry-git-version-plugin

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poetry_git_version_plugin-0.1.2.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

poetry_git_version_plugin-0.1.2-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

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