Skip to main content

A simple version based on git/gh.

Project description

EN

RU

A simple version based on git/gh.

If there have been no commits or uncommitted changes since the most recent tag, the version from the tag is used as the project version.

If the latest tag is final release, then the last part is incremented by 1 and alpha 0 is added.

If the latest tag is pre-release, the pre-release number is incremented by 1.

used:

add gitversion_simple[setuptools] in build-system.requires (in pyproject.toml)

[build-system]
requires = [
  "setuptools>=81.0.0",
  "gitversion_simple[setuptools]~=3.0",
]

If you use a different backend for the build:

  1. Add gitversion_simple instead of gitversion_simple[setuptools]
  2. Manually call gitversion_simple.version.get_version or gitversion_simple.version.get_with_config
  3. *If this is a public builder, create a PR/issue to add

This project is based on vcs-versioning, so it supports the entry point vcs_versioning.discover_workdir.

If the file pyproject.toml is not located in the root of the repository, then specify the path to the root of the repository in the vcs_root parameter in the tool.gitversion_simple table.

For the following repository

git_folder/
├─ .git/
├─ my_project
│  ├─ ...
│  └─ pyproject.toml
├─ my_project2
│  ├─ ...
│  └─ pyproject.toml
└ README.md

Add to both pyproject.toml files

[tool.gitversion_simple]
vcs_root = ".."

examples:

last tag version
v1.0.0 1.0.1
v1.0.0a1 1.0.0a2
v1.0.0b2 1.0.0b3
v1.0 1.1
v1.2.3.4 1.2.3.5
v26.1 26.2

RU

EN

Простая версия, основанная на git/gh.

Если с момента создания последнего тега не было никаких фиксаций или незафиксированных изменений, в качестве версии проекта используется версия из тега.

Если последним тегом является финальным релизом, то последняя часть увеличивается на 1 и добавляется alpha 0.

Если последним тегом является предварительным релизом, то номер предварительного выпуска увеличивается на 1.

Использование:

добавьте gitversion_simple[setuptools] в build-system.requires (в файл pyproject.toml)

[build-system]
requires = [
  "setuptools>=81.0.0",
  "gitversion_simple[setuptools]~=3.0",
]

Если вы используете другой бекенд для сборки:

  1. Добавьте gitversion_simple, вместо gitversion_simple[setuptools]
  2. Вручную вызовите gitversion_simple.version.get_version или gitversion_simple.version.get_with_config
  3. *Если это публичный сборщик, создайте PR/issue на добавление

Этот проект основан на vcs-versioning, поэтому он поддерживает точку входа vcs_versioning.discover_workdir.

Если файл pyproject.toml находиться не в корне репозитория, то укажите путь до корня репозитория в параметре vcs_root в таблице tool.gitversion_simple.

Для следующего репозитория

git_folder/
├─ .git/
├─ my_project
│  ├─ ...
│  └─ pyproject.toml
├─ my_project2
│  ├─ ...
│  └─ pyproject.toml
└ README.md

Добавьте в оба файла pyproject.toml

[tool.gitversion_simple]
vcs_root = ".."

примеры:

последний тег версия
v1.0.0 1.0.1
v1.0.0a1 1.0.0a2
v1.0.0b2 1.0.0b3
v1.0 1.1
v1.2.3.4 1.2.3.5
v26.1 26.2

Project details


Download files

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

Source Distribution

gitversion_simple-3.0.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

gitversion_simple-3.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file gitversion_simple-3.0.0.tar.gz.

File metadata

  • Download URL: gitversion_simple-3.0.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gitversion_simple-3.0.0.tar.gz
Algorithm Hash digest
SHA256 6f1afa1dac9709030115db3c9c98d8fda0fd76f413d5ee3e3465e2e2a1017171
MD5 be02b3cab6337e23bcea10e250cbbedc
BLAKE2b-256 a9b8953023a79b8a11dcb6e441e97a48e29908dcfd2d2eff074ac49fc637fef7

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitversion_simple-3.0.0.tar.gz:

Publisher: release.yml on zedzhen/gitversion_simple

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gitversion_simple-3.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gitversion_simple-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a19751ee076136e9c07c94faccac6cfe206374b4f2826c20502e362c25eb60f
MD5 994b9971ee5dee446493f3ad101a25b3
BLAKE2b-256 bfef72235a364f80ca22216d5c1b9cfc2985f23882a8606aa890c55f3c45260d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitversion_simple-3.0.0-py3-none-any.whl:

Publisher: release.yml on zedzhen/gitversion_simple

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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