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]~=2.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 setuptools_scm.parse_scm.

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]~=2.0",
]

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

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

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

Если файл 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-2.0.1.tar.gz (7.6 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-2.0.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gitversion_simple-2.0.1.tar.gz
Algorithm Hash digest
SHA256 1da7071cb59ee0ad9a56ad780d68d53555698548ab429609cb5537cd582fccde
MD5 0da15f74e470e19779dee8dee2f71424
BLAKE2b-256 d010cbe84aef0afedc68185591c4662f5f110712006d008b051660fd7f546b14

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitversion_simple-2.0.1.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-2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gitversion_simple-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e096b4cd8c6ac941190c9b981468e0048a37e270c4960b1c9e05dae664e7ecbe
MD5 d105db85cd19218fc070f4ffdadb1797
BLAKE2b-256 2ce5cfa0ca3970a723a1bec5bf1eaf2203f83fcf7db56fd1cf5ec0f36598e84e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gitversion_simple-2.0.1-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