Name | hatch-bgd JSON |
Version |
0.0.1
JSON |
| download |
home_page | None |
Summary | base version, latest Git commit ID, and latest update date. |
upload_time | 2025-03-18 11:33:58 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
git
hatch
plugin
version
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# hatch-bgd
**b**ase version, latest **G**it commit ID, and latest update **d**ate
---
This provides a plugin for [Hatch](https://github.com/pypa/hatch) that automatically generates the version string in the format "base-version+git-commit-id.date" (e.g. `1.0.0+g4926eb8.d20250318`)
**Table of Contents**
- [Global dependency](#global-dependency)
- [Version source](#version-source)
- [Version source options](#version-source-options)
- [Version source environment variables](#version-source-environment-variables)
- [License](#license)
## Global dependency
Ensure `hatch-bgd` is defined within the `build-system.requires` field in your `pyproject.toml` file.
```toml
[build-system]
requires = ["hatchling", "hatch-bgd"]
build-backend = "hatchling.build"
```
## Version source
The [version source plugin](https://hatch.pypa.io/latest/plugins/version-source/reference/) name is `bgd`.
- ***pyproject.toml***
```toml
[tool.hatch.version]
source = "bgd"
```
- ***hatch.toml***
```toml
[version]
source = "bgd"
```
### Version source options
| Option | Type | Description |
| --- | --- | --- |
| `base-version` | `str` | - |
| `build-type` | `str` | When selecting between `dev` and `release`, if `dev` is chosen, a local version identifier in the format `f"{latest Git commit ID}.{latest update date}"` will be automatically appended after the `base-version`. |
### Display version
`hatch version` will print the version to the terminal without modifying the source directory.
```console
$ hatch version
1.0.0+g4926eb8.d20250318
```
## License
`hatch-bgd` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
Raw data
{
"_id": null,
"home_page": null,
"name": "hatch-bgd",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "git, hatch, plugin, version",
"author": null,
"author_email": "TownWish <townwish2023@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/d3/9d/e17db60dacc6b6f48a9f815f88d3425e699ca8472a261c6157c85375ee25/hatch_bgd-0.0.1.tar.gz",
"platform": null,
"description": "# hatch-bgd\n\n**\u200bb**ase version, \u200blatest **G**it commit ID, and \u200blatest update **d**ate\n\n---\n\nThis provides a plugin for [Hatch](https://github.com/pypa/hatch) that automatically generates the version string in the format \"base-version+git-commit-id.date\" (e.g. `1.0.0+g4926eb8.d20250318`)\n\n**Table of Contents**\n\n- [Global dependency](#global-dependency)\n- [Version source](#version-source)\n - [Version source options](#version-source-options)\n - [Version source environment variables](#version-source-environment-variables)\n- [License](#license)\n\n## Global dependency\n\nEnsure `hatch-bgd` is defined within the `build-system.requires` field in your `pyproject.toml` file.\n\n```toml\n[build-system]\nrequires = [\"hatchling\", \"hatch-bgd\"]\nbuild-backend = \"hatchling.build\"\n```\n\n## Version source\n\nThe [version source plugin](https://hatch.pypa.io/latest/plugins/version-source/reference/) name is `bgd`.\n\n- ***pyproject.toml***\n\n ```toml\n [tool.hatch.version]\n source = \"bgd\"\n ```\n\n- ***hatch.toml***\n\n ```toml\n [version]\n source = \"bgd\"\n ```\n\n### Version source options\n\n| Option | Type | Description |\n| --- | --- | --- |\n| `base-version` | `str` | - |\n| `build-type` | `str` | When selecting between `dev` and `release`, if `dev` is chosen, a local version identifier in the format `f\"{latest Git commit ID}.{latest update date}\"` will be automatically appended after the `base-version`. |\n\n\n### Display version\n\n`hatch version` will print the version to the terminal without modifying the source directory.\n\n```console\n$ hatch version\n1.0.0+g4926eb8.d20250318\n```\n\n## License\n\n`hatch-bgd` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "\u200bbase version, \u200blatest Git commit ID, and \u200blatest update date.",
"version": "0.0.1",
"project_urls": {
"Source": "https://github.com/townwish4git/hatch-bgd"
},
"split_keywords": [
"git",
" hatch",
" plugin",
" version"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c5229959d943811ebeb69dc7a4e986aa87d4d1302abd83d50324d4e4b32d2e76",
"md5": "65a6a74ffb753f7556351075aa6177e5",
"sha256": "7d5adc1ad0eda5206c324a83f47cbc855b8cf1913e1772364917ebfff7371d81"
},
"downloads": -1,
"filename": "hatch_bgd-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "65a6a74ffb753f7556351075aa6177e5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 3792,
"upload_time": "2025-03-18T11:33:57",
"upload_time_iso_8601": "2025-03-18T11:33:57.932690Z",
"url": "https://files.pythonhosted.org/packages/c5/22/9959d943811ebeb69dc7a4e986aa87d4d1302abd83d50324d4e4b32d2e76/hatch_bgd-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d39de17db60dacc6b6f48a9f815f88d3425e699ca8472a261c6157c85375ee25",
"md5": "330320c3ca61ba68ec289d0a1e5d744a",
"sha256": "4daf8d99efa2df571145ff3528c479201d127fb34bc2abb448d1c32f6106ee66"
},
"downloads": -1,
"filename": "hatch_bgd-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "330320c3ca61ba68ec289d0a1e5d744a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 3674,
"upload_time": "2025-03-18T11:33:58",
"upload_time_iso_8601": "2025-03-18T11:33:58.851221Z",
"url": "https://files.pythonhosted.org/packages/d3/9d/e17db60dacc6b6f48a9f815f88d3425e699ca8472a261c6157c85375ee25/hatch_bgd-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-03-18 11:33:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "townwish4git",
"github_project": "hatch-bgd",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "hatch-bgd"
}