Name | py-version-from-tag JSON |
Version |
1.2.0
JSON |
| download |
home_page | |
Summary | A simple tool to automatically write git tag name to version field of python setup files. |
upload_time | 2023-01-22 10:45:02 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | MIT |
keywords |
git
tag
setup
build
pyproject.toml
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# py_version_from_tag
py_version_from_tag is a simple CLI tool that will obtain the tag name of the current commit, extract version from it
and write it to python setup file.
This can be very useful in automatic build processes, so you don't need to manually update version string in setup files
when you have already written it as a tag name.
Usage
----------
Prerequisites:
- Your working directory should be placed on a valid git repository
- The current commit (HEAD) should be tagged
```bash
python -m pip install py_version_from_tag
python -m py_version_from_tag -p {path to pyproject.toml}
```
Alternatively, if the current commit is not tagged, but you want to use the latest commit as version,
you can use the *-l* switch, like this:
```bash
python -m py_version_from_tag -l
```
For full list of available options, run
```bash
python -m py_version_from_tag -h
```
Notes
----------
- Currently, only pyproject.toml file is supported as a setup file
- Tag name should contain a valid version information, for example: "v3.1.2", "1.2.3", "v4.5.6_alpha" are all examples
of valid tag version names
Raw data
{
"_id": null,
"home_page": "",
"name": "py-version-from-tag",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "git,tag,setup,build,pyproject.toml",
"author": "",
"author_email": "Jost Prevc <jost.prevc@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ec/ec/9c173a266b11e56cd9c2d5aaf192b4ab07a818a58c13bb09ff50a486c5cd/py_version_from_tag-1.2.0.tar.gz",
"platform": null,
"description": "# py_version_from_tag\npy_version_from_tag is a simple CLI tool that will obtain the tag name of the current commit, extract version from it\nand write it to python setup file.\n\nThis can be very useful in automatic build processes, so you don't need to manually update version string in setup files\nwhen you have already written it as a tag name.\n\nUsage\n----------\n\nPrerequisites:\n- Your working directory should be placed on a valid git repository\n- The current commit (HEAD) should be tagged\n\n```bash\n python -m pip install py_version_from_tag\n python -m py_version_from_tag -p {path to pyproject.toml}\n```\nAlternatively, if the current commit is not tagged, but you want to use the latest commit as version,\nyou can use the *-l* switch, like this:\n\n```bash\n python -m py_version_from_tag -l\n```\nFor full list of available options, run\n\n```bash\n python -m py_version_from_tag -h\n```\n\nNotes\n----------\n- Currently, only pyproject.toml file is supported as a setup file\n- Tag name should contain a valid version information, for example: \"v3.1.2\", \"1.2.3\", \"v4.5.6_alpha\" are all examples\nof valid tag version names\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple tool to automatically write git tag name to version field of python setup files.",
"version": "1.2.0",
"split_keywords": [
"git",
"tag",
"setup",
"build",
"pyproject.toml"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9e96e77d82920e7ae4e8d7b207525bcce29f760c43af3ca2e029bb20a323c442",
"md5": "1624ba962b2bbd584ac128815501f970",
"sha256": "0ec0aeb87965af39123ec75db1c42dfa23f818d1fe25684099f45563a77b9977"
},
"downloads": -1,
"filename": "py_version_from_tag-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1624ba962b2bbd584ac128815501f970",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 5091,
"upload_time": "2023-01-22T10:45:00",
"upload_time_iso_8601": "2023-01-22T10:45:00.567365Z",
"url": "https://files.pythonhosted.org/packages/9e/96/e77d82920e7ae4e8d7b207525bcce29f760c43af3ca2e029bb20a323c442/py_version_from_tag-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ecec9c173a266b11e56cd9c2d5aaf192b4ab07a818a58c13bb09ff50a486c5cd",
"md5": "233e91c84348574d2660a8ef75437e84",
"sha256": "31c29080587225ec15f5fc21962c78b2cfdbb08ba05e3dd99735e414a2abfd17"
},
"downloads": -1,
"filename": "py_version_from_tag-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "233e91c84348574d2660a8ef75437e84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 14765,
"upload_time": "2023-01-22T10:45:02",
"upload_time_iso_8601": "2023-01-22T10:45:02.417423Z",
"url": "https://files.pythonhosted.org/packages/ec/ec/9c173a266b11e56cd9c2d5aaf192b4ab07a818a58c13bb09ff50a486c5cd/py_version_from_tag-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-22 10:45:02",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "py-version-from-tag"
}